-
Install Node Version
Install nvm, if not yet installed
In the root directory, run the following command to install node from
.nvmrc
:$ nvm install
-
Install Docker from here
-
From the root directory, run
npm run docker:dev
to start the docker corresponding docker containers accordingly.
-
Postgres database is running from docker:dev
-
For migrations in docker db, run the corresponding migrations from root directory package.json
# generate $ npm run prisma:generate # migrate $ npm run prisma:migrate:dev
- Open https://api.slack.com/apps/new and choose "From an app manifest"
- Choose the workspace you want to install the application to
- Copy the contents of manifest.json into the text box that says
*Paste your manifest code here*
(within the JSON tab) and click Next - Review the configuration and click Create
- Click Install to Workspace and Allow on the screen that follows. You'll then be redirected to the App Configuration dashboard.
Before you can run the app, you'll need to store some environment variables.
- Copy
.env.sample
to.env
- Open your apps configuration page from this list, click OAuth & Permissions in the left hand menu, then copy the Bot User OAuth Token into your
.env
file underSLACK_BOT_TOKEN
- Click Basic Information from the left hand menu and follow the steps in the App-Level Tokens section to create an app-level token with the
connections:write
scope. Copy that token into your.env
asSLACK_APP_TOKEN
.
-
Environment Variables
Copy the
.env.example
file to.env
and modify the permission$ cp .env.sample .env $ chmod 640 .env
- NODE_ENV
- This env variable is checked by lot of libraries and they work faster on NODE_ENV=production.
- Hence even on staging, set NODE_ENV=production.
- NODE_ENV
-
Install node modules
$ npm install
-
Start server
$ npm run start:dev
-
Fix lints and errors
# automatically lint fixes $ npm run lint
Fix the errors shown (can ignore warnings)
- Install the recommended extensions for the workspace/project
- VS Code extensions (prettier, lint, markdown) are there to help keep a consistent code standard. It auto formats code on save and also will show warnings/errors to keep the code style consistent across the project