npm i -g babel-cli babel webpack webpack-dev-server mocha istanbul
npm i
npm start
- for dev (server at localhost:8080)npm run build
- for prod
with mocha and chai
npm test
- oncenpm run test:watch
- guess what
- React Developer Tools extension for chrome
To run the server use one of the lines below:
node server/app.js # Option 1
npm run server # Option 2
The server is being started on port 9090
and it's cors
safe (can be accessed from any host).
Locally it runs like http://localhost:9090
, and on staging http://h25-hack.wixpress.com:9090
.
Verb | Url | Description |
---|---|---|
GET | http://localhost:9090/api/texts | Get all the texts |
POST | http://localhost:9090/api/texts | Create a new text |
GET, POST | http://localhost:9090/api/texts/:id | Get, update a single text |
DELETE | http://localhost:9090/api/texts/:id | Delete a single text |
GET | http://localhost:9090/api/texts/:id/suggestions | Gets the suggestions for a single text |
GET | http://localhost:9090/api/tags | Get all the tags |
GET | http://localhost:9090/api/categories | Get all the categories |
GET | http://localhost:9090/api/sections | Get all the sections |
GET | http://localhost:9090/api/intents | Get all the intents |
GET | http://localhost:9090/api/styles | Get all the styles |
GET | http://localhost:9090/api/assistant/sites | Get all sites |
GET | http://localhost:9090/api/assistant/words | Get all words |