Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pan261 authored Feb 11, 2022
1 parent b3e0339 commit 9b0c6a5
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
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/

0 comments on commit 9b0c6a5

Please sign in to comment.