- NodeJS
- Express (+ async.js, mongoose, axios, joi, rgb-hex, bluebird, ... --> check package.json)
- babel-node
- colour-proximity
- mongoDB (hosted at mlab.com)
- Google Cloud Vision API
- node 8.6.0
- npm 5.6.0
- yarn 1.3.2
- babel-node 6.26.0
node -v && npm -v && yarn -v && babel-node -V
// 8.6.0
// 5.6.0
// 1.3.2
// 6.26.0
npm i -g yarn
cd to /path/to/project
Fetch config files (unversioned) from Dropbox online folder that was shared with you :
- .env
- gcloud-f35c8586d088.json
and put them at project root.
yarn install
yarn start
Wait for following message to appear :
server started on port 3000 (development)
The app should now be available at :
http://localhost:3000/api/health-check
// should display : "OK"
POST / http://localhost:3000/api/catalog/import
url = url/to/catalog.csv
GET : http://localhost:3000/api/catalog/update/colors
no arguments not be passed as GET
GET http://localhost:3000/api/catalog/recommend/by-color
color=<hexa color> | < rgb color>
Swagger webdoc API up-coming
cd server/commands
babel-node import-catalog.js --help
babel-node import-catalog-colors.js --help
babel-node products-recommendation.js --help
babel-node import-catalog.js --url https://url/to/csvfile
babel-node update-catalog-colors
--limit <limit: int> can be passed
babel-node products-recommendation --color <#xxyyzz>