-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# FusionFileSync | ||
# FusionFileSync | ||
|
||
## Setup | ||
To setup and run the project: | ||
|
||
1. Install node | ||
2. Install docker and docker-compose | ||
3. Configure environment variables (explained below) | ||
4. Run `npm i` in the root directory | ||
- This will install all of the production and dev dependencies | ||
5. Run `tsc` to compile the typescript into the `/src/build` | ||
- If this doesn't work, you may need to install typescript globally with `npm i -g typescript` | ||
6. Run `docker-compose up --build` to build the containers | ||
7. Navigate to `localhost:3000/auth` to sign in through the 3-legged-auth process, passing an access token to the server | ||
8. To shutdown, you can use `ctrl-c` or `docker-compose down` | ||
|
||
|
||
## Environment variables | ||
Make a `.env` file in the root directory of the project, and fill it with the following info | ||
``` | ||
FORGE_CLIENT_ID=[forge_client_id] | ||
FORGE_CLIENT_SECRET=[forge_client_secret] | ||
FORGE_CALLBACK_URL=http://localhost:3000/callback/ | ||
PORT_SERVER=3000 | ||
PORT_DB=5432 | ||
LOCAL_DIR_GANTRY=./file_share/Gantry | ||
LOCAL_DIR_LATHE=./file_share/Lathe | ||
LOCAL_DIR_MILL=./file_share/Mill | ||
LOCAL_DIR_WATERJET=./file_share/Waterjet | ||
WEBHOOK_TOKEN=[webhook_token] | ||
POSTGRES_USER=user | ||
POSTGRES_PASSWORD=pass | ||
POSTGRES_DB=filesync | ||
NGROK_AUTH=[ngrok_auth_token] | ||
``` | ||
|
||
### Notes | ||
- The `LOCAL_DIR_[]` environment variables can be changed to whatever folders you want synced. | ||
- You will need a Autodesk Forge Project which you can make here: https://forge.autodesk.com/myapps/ | ||
- You will also need an ngrok account (free tier works): https://ngrok.com/ | ||
- The webhook token can by anything, here is an example: https://forge.autodesk.com/en/docs/webhooks/v1/reference/http/tokens-POST/ | ||
|