A RESTful API for ThreeDify.
ThreeDify is a online platform where you can upload images and create a 3D reconstruction of the images.
Variable | Description |
---|---|
BASE_URL | API base url e.g. http://localhost |
APP_BASE_URL | APP url e.g. http://localhost:8000 |
PORT | Port to serve the api e.g. 3000 |
ACCESS_TOKEN_SECRET | Key used for signing access token |
REFRESH_TOKEN_SECRET | Key used for signing refresh token |
DB_NAME | Name of the database |
DB_USER | User name of the database |
DB_PASSWORD | Password for the user of the database |
STORAGE_API | Storage api to use. Can be local or drive . |
GOOGLE_CLIENT_ID | Client Id for google oauth app. |
GOOGLE_CLIENT_SECRET | Client Secret for google oauth app. |
GOOGLE_REDIRECT_URL | Redirect url for google oauth app. |
GOOGLE_REFRESH_TOKEN | Refresh token for google oauth app |
GOOGLE_DRIVE_UPLOAD_FOLDER_ID | Id of folder to upload files to in google drive. |
- Make sure you have
node-v13.11.0
andyarn-v1.22.4
- Install Postgresql
- Install dependencies
$ yarn
- Create
.env
file
$ cp .env.example .env
We use knex for managing migration. You can find all the migration in migrations
folder.
$ yarn knex migrate:latest
$ yarn knex migrate:make migration_name
$ yarn knex migrate:down
Read more about knex.
$ yarn build
$ yarn start
$ yarn start:dev
Check lint errors
$ yarn lint
Fix lint errors
$ yarn lint:fix