smswithoutborders / SMSwithoutborders-BE

Here is the cloud API and User management services. It is directly configurable with MySQL databases for managing users. Also provides out of the box integrations of Google OAuth end-points and Account authentication
GNU General Public License v3.0
12 stars 3 forks source link

Error when running production mode #26

Closed sherlockwisdom closed 2 years ago

sherlockwisdom commented 2 years ago

I get the following warning and output when I run as production:

 OAuth-2.0-authentications-API@1.0.0 start_main
> node controllers/sync_platforms.js && node server.js

WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Creating Database smswithoutborders ...
Synchronizing database schema ...
Available Platforms:
----> gmail
----> twitter
----> telegram
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
debug:   Environment: production
info:    Running secured on port:
PromiseFru commented 2 years ago

@sherlockwisdom please did you create the config file for production https://github.com/smswithoutborders/SMSwithoutborders-BE/blob/dev/docs/CONFIGURATIONS.md#production-environment-configurations

sherlockwisdom commented 2 years ago

oops, just did tho and now have

0|BE-serve | > OAuth-2.0-authentications-API@1.0.0 start_main
0|BE-serve | > node controllers/sync_platforms.js && node server.js
0|BE-serve | 
0|BE-serve | Creating Database smswithoutborders ...
0|BE-serve | Synchronizing database schema ...
0|BE-serve | Available Platforms:
0|BE-serve | ----> gmail
0|BE-serve | ----> twitter
0|BE-serve | ----> telegram
0|BE-serve | debug:   Environment: production
0|BE-serve | info:    Running secured on port:
PromiseFru commented 2 years ago

This is fixed here https://github.com/smswithoutborders/SMSwithoutborders-BE/commit/a43c478a97c9c19512aa3fe1842b68a80e66976c

sherlockwisdom commented 2 years ago

is this something to take at?

0|BE-server | WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names

PromiseFru commented 2 years ago

is this something to take at?

0|BE-server | WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names

Please @sherlockwisdom on what occasion does this happen?

sherlockwisdom commented 2 years ago

when I run

NODE_ENV=production npm run start_main

it's part of the logs that populate

PromiseFru commented 2 years ago

@sherlockwisdom seems this is a pm2 and node-config issue

https://github.com/node-config/node-config/issues/244#issuecomment-320778070

sherlockwisdom commented 2 years ago

Thanks! I'm closing this now

PromiseFru commented 2 years ago

https://github.com/node-config/node-config/wiki/Multiple-Node-Instances