feathersjs - Deploy FeatherJS w/ Nginx and Prefixing /api -


i can setup nginx work feathersjs on /.

my nginx config works on / proxy_pass set. got in 502 if change serveur block hit /api

my main goal able hit api on /api.

i try implement lib. https://www.npmjs.com/package/feathers-versionate

i added app.js :

// configure versionate  app.configure(versionate()); // register base-path "/api", , provide access via `app.v1`  app.versionate('v1', '/api'); 

then on each *.service.js added make work both in dev , prod env :

// initialize our service options requires if (app.get('env') === 'production') {   app.v1.use('/mail', createservice(options)); } else {   app.use('/mail', createservice(options)); } 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -