-
Notifications
You must be signed in to change notification settings - Fork 2
RunningLocally
Naohide Sano edited this page Jan 18, 2022
·
3 revisions
Make sure you have Java and Maven installed. Also, install the Heroku CLI.
- https://www.baeldung.com/spring-boot-https-self-signed-certificate
- https://github.com/umjammer/vavi-apps-webdav/blob/github/src/main/resources/application-test.properties
$ vi .env
ONEDRIVE_CLIENT_ID=...
ONEDRIVE_CLIENT_SECRET=...
ONEDRIVE_REDIRECT_URL=https://localhost:8443/redirect/microsoft
DROPBOX_CLIENT_ID=...
DROPBOX_CLIENT_SECRET=...
DROPBOX_REDIRECT_URL=https://localhost:8443/redirect/dropbox
BOX_CLIENT_ID=...
BOX_CLIENT_SECRET=...
BOX_REDIRECT_URL=https://localhost:8443/redirect/box
GOOGLEDRIVE_CLIENT_SECRET={"web":{"client_id":...,"redirect_uris":["https://localhost:8443/redirect/google"]}}
WEBDAV_ADMIN_PASSWORD=...
WEBDAV_USER_PASSWORD=...
PORT=8443
LOCAL_TEST_KEYSTORE=tmp/keystore.p12
LOCAL_TEST_KEYSTORE_PASSWORD=...
LOCAL_TEST_KEYSTORETYPE=PKCS12
LOCAL_TEST_KEYALIAS=webdav
JDBC_DATABASE_URL=jdbc:hsqldb:file:/tmp/tokendb
JDBC_USER_NAME=sa
JDBC_PASSWORD=
SPRING_PROFILES_ACTIVE=test
${BOX_REDIRECT_URL}
before you run this app at the box developer console (https://app.box.com/developers/console/app/999999/configuration).
any kind of rdbms is ok. set JDBC_DATABASE_URL
, JDBC_USER_NAME
, JDBC_PASSWORD
in .env
.
and run ddl like below before you run this app.
CREATE TABLE IF NOT EXISTS credential (id VARCHAR(512) UNIQUE, token VARCHAR(2048));
CREATE TABLE IF NOT EXISTS google (id VARCHAR(512) UNIQUE, credentials BYTEA);
INSERT INTO google VALUES ('StoredCredential', NULL);
INSERT INTO credential VALUES ('onedrive:your_account@hotmail.com', NULL);
INSERT INTO credential VALUES ('googledrive:your_account@gmail.com', NULL);
INSERT INTO credential VALUES ('box:your_account@box.com', NULL);
INSERT INTO credential VALUES ('dropbox:your_account@dropbox.com', NULL);
:
$ git clone https://github.com/heroku/your-heroku-app.git
$ cd your-heroku-app
$ mvn install
$ heroku local
Your app should now be running on https://localhost:${PORT}/