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
Post a Comment