app-generator / api-server-nodejs

Nodejs API Server - Express / SQLite / TypeORM | AppSeed
https://appseed.us/boilerplate-code/nodejs-starter/
Other
227 stars 87 forks source link

start server side #28

Open Telexplanning opened 1 year ago

Telexplanning commented 1 year ago

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 har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated vm2@3.9.19: 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 node-pre-gyp@0.11.0: 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 tar@2.2.2: 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.

api-server-nodejs@1.0.0 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

app-generator commented 1 year ago

Hello @Telexplanning

Please use the target

$ npm run dev
// OR
$ yarn dev