nashdev slack jobs api
Note: This initial version was written as part of a live stream at NashJS (7/12/17)... so the code is precarious at best. It is not an endorsement of best practices or code cleanliness. Definitely could use a refactor 😛
-
Make sure you have NodeJS, npm, and PostgreSQL installed.
-
Clone the repository
git clone git@github.com:nashdev/jobs.git
-
Install your dependencies
cd path/to/nashdev-jobs npm install
-
Copy
.env.example
to.env
and fill out the values. -
Set up the development database
npm run setup
-
Start the app
npm run start
-
Once you see
Express server listening on port 3000
in the console, you can View the running app at http://localhost:3000
- Create a new app by navigating to https://api.slack.com/apps?new_app=1. You will need to log in to one of your Slack Workspaces so that the app can be added to it, and, if possible, you should choose one where you are an Owner or Admin, as you will have to approve the app being attached to that Workspace.
- Click on 'Basic Information' and add the 'Client ID' and 'Client Secret' to the
.env
file.SLACK_CLIENT_ID=''
("Basic Information > Client ID")SLACK_CLIENT_SECRET=''
("Basic Information > Client Secret")
- Go to the "Features > OAuth & Permissions" and click "Add New Redirect URLs".
- Add the value
http://localhost:3000/slack/auth
as a redirect URL.
- Create a Bot User by going to "Features > Bot Users" and entering a display name and default username and then saving.
- Go to the "Features > OAuth & Permissions" section, click "Install App to Workplace".
- Next, scroll down to "Scopes", and copy and paste each of the following permissions, one at a time, into the "Select Permission Scopes" field. The related permission should then be highlighted for you to select and add to your list of Scopes:
chat:write:user
bot
users.profile:read
- Update the SLACK_BOT_TOKEN in your .env file with the newly generated values now provided on the indicated pages of your new Slack app:
SLACK_BOT_TOKEN=''
("OAuth & Permissions > Bot User OAuth Access Token")
Simply run npm test
and all your tests in the test/
directory will be run.
If you would like to contribute, you can check out all open issues/feature requests or submit your own on our Issues page (look for "enhancement" and "help wanted" labels). If you find an issue you would like to work on, you can complete the following steps to submit a pull request:
- Fork the repository
- Add any code changes inside the forked repository
- Submit pull request to our
master
branch
0.0.1
- Initial release...lots to do.
Copyright (c) 2017
Licensed under the MIT license.