An API for detecting sad sentences in the github comments.
- node
^8
https://nodejs.org/en/ - npm
^4
- CF tool https://github.com/cloudfoundry/cli#getting-started
Name | Description |
---|---|
PORT |
The port to listen |
VERBOSE_LOGGING |
The flag if debug logging in enabled |
GITHUB_TOKEN |
The github token to use for API requests. Create it here https://github.com/settings/tokens. Don't check any permissions. |
npm run <script> |
Description |
---|---|
start |
Serves the app in prod mode. It will override config with config/production.js |
dev |
Same as npm start , but enables nodemon for the server as well. |
lint |
Lint all .js files. |
lint:fix |
Lint and fix all .js files. Read more on this. |
- go to https://console.eu-gb.bluemix.net
- click Create
- pick SDK for Node.js
- pick any free App name and click Create
- Click on the app and go to tab Getting started
- Download the Starter Code from Bluemix by clicking DOWNLOAD STARTER CODE
- Unpack this starter code to a different location, and only copy the manifest.yml to your project directory
- If you copied
manifest.yml
to your project directory, you can just runcf push
for deployment. If you didn't copy over the manifest.yml, you'll have to tellcf push <appnamehere>
- Open https://console.bluemix.net/catalog/services/tone-analyzer/?env_id=ibm%3Ayp%3Aus-south and add this service to your created app.
Example URL: https://sky90210.mybluemix.net/api/tones
Update this url in extension source code