api-server-nodejs
api-server-nodejs copied to clipboard
start server side
https://github.com/app-generator/api-server-nodejs
need to start the server and point to the client to this server (Where do I change the API url in env?)
I've the client under the folder: C:\Users\nuno.lopes#Work\Projects\pro>
Log:
C:\Users\nuno.lopes#Work\Projects\pro_server>npm install
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
added 958 packages, and audited 959 packages in 37s
119 packages are looking for funding
run npm fund for details
18 vulnerabilities (9 moderate, 3 high, 6 critical)
To address issues that do not require attention, run: npm audit fix
To address all issues (including breaking changes), run: npm audit fix --force
Run npm audit for details.
C:\Users\nuno.lopes#Work\Projects\pro_server>npm start
npm WARN config global --global, --local are deprecated. Use --location=global instead.
[email protected] start pm2 start production.config.json
-------------
/\\\\\\_/\\/\\/\\\\_ _/\/////////\_/\\\/\\\/\///////\_ /\_/\_/\//\_/\//\_/////\_ _/\\\\\\//\\///\/\//\_/\/ /\//////////\_///\//\_/\//_____ /\_/\_////\_____/\//_____ /\_/\_/\_/\/__________ /\_/\_/\_/\\\\\\\_ _////////////////////////
Runtime Edition
PM2 is a Production Process Manager for Node.js applications
with a built-in Load Balancer.
Start and Daemonize any application:
$ pm2 start app.js
Load Balance 4 instances of api.js:
$ pm2 start api.js -i 4
Monitor in production:
$ pm2 monitor
Make pm2 auto-boot at server restart:
$ pm2 startup
To go further checkout:
http://pm2.io/
-------------
[PM2] Spawning PM2 daemon with pm2_home=C:\Users\nuno.lopes.pm2 [PM2] PM2 Successfully daemonized [PM2][WARN] Applications nodejs_api not running, starting... [PM2][ERROR] Error: Script not found: C:\Users\nuno.lopes#Work\Projects\pro_server\build\index.js