From 9b0c6a5c0c8ad732eb45bfe684dacdc3fb02aa09 Mon Sep 17 00:00:00 2001 From: "Pan, Kevin Zhu" Date: Fri, 11 Feb 2022 18:18:03 -0500 Subject: [PATCH] Update README.md --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0080102..61ff014 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ -# FusionFileSync \ No newline at end of file +# 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/ +