Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Running the app

DerLev edited this page Aug 9, 2022 · 4 revisions

To run the app you first need to take the type of running the app into consideration.
You can either run the app through a Docker container or you can run it directly with NodeJS and Yarn installed on your machine.

Note

Due to the way how Google works an OAuth App that is in testing mode can only give out refresh tokens that expire after 7 days. I'm planning to solve this problem by making it easier to generate OAuth tokens directly through the container.

Docker

To run the app using Docker first follow these steps to generate your tokens, keys and secrets

  1. Google Calendar API setup
  2. Notion Application setup

Now you can follow these steps to run the app

  1. make a directory for your docker-compose.yml and config files and cd into it

  2. copy the docker-compose.example.yml into your docker-compose.yml file

  3. create the config files (.env, dbs.js & gcal-sync.js) in the directory where your docker-compose.yml is located

  4. copy the .env.example into your .env file and enter all your tokens and secrets

  5. configure the container in the dbs.js and gcal-sync.js files by following these steps

  6. run docker-compose up or docker compose up to start the app and validate that everthing is working (close app with CTRL+C or ⌘+C)

  7. run the app as a daemon with docker-compose up -d or docker compose up -d

    DONE!

NodeJS

To run the app using NodeJS and Yarn first make sure you are running at least NodeJS version 16.
Now you first need to create all the required tokens, secrets and keys

  1. Google Calendar API setup
  2. Notion Application setup

Now you can follow these steps to run the app

  1. clone the respository to a directory on your machine

  2. create the .env file in the root of the repository, copy the .env.example to it and fill it with your tokens

  3. create a config/ directory in the root of the repository, create the config files (dbs.js & gcal-sync.js) in it and configure the app by following these steps

  4. install all needed packages by running yarn

  5. build the app with yarn build

  6. run the app with yarn start

    DONE!