I'm new in linux, js and node.js development so sorry if this question is stupid...but.
I have my first app on my local test server. When I go to the folder with the code and type npm start, everything works correctly.BUTI wanted to run it on the background and use systemctl to work with the app. But When I use sudo systemctl start "my app" I'm getting
Please help me :/
Unexpected token '.'
Stopping My Eclipse Application... eclipse.service: Deactivated successfully. Stopped My Eclipse Application. Started My Eclipse Application. eclipse@1.0.0 start nodemon server.js [nodemon] 3.1.0 [nodemon] to restart at any time, enter `r\>\[nodemon\] watching path(s): *.*\[nodemon\] watching extensions: js,mjs,cjs,\>\[nodemon\] starting `node server.js`/var/www/projects/eclipse/node_modules/mon\>session: options?.session,^SyntaxError: Unexpected token '.'at wrapSafe (internal/modules/cjs/load\>at Module.\_compile (internal/modules/c\>at Object.Module.\_extensions..js (inte\>at Module.load (internal/modules/cjs/l\>at Function.Module.\_load (internal/mod\>at Module.require (internal/modules/cj\>at require (internal/modules/cjs/helpe\>at Object.\<anonymous\> (/var/www/projec\>at Module.\_compile (internal/modules/c\>at Object.Module.\_extensions..js (inte\>\[nodemon\] app crashed - waiting for file c\>\
.service
[Unit]Description=My Eclipse Application[Service]ExecStart=/usr/bin/npm startWorkingDirectory=/var/www/projects/eclipseRestart=always[Install]WantedBy=multi-user.target
Node.js v20.12.2.nodemon -v3.1.0nvm -v0.39.7
I've tried to update nvm, nodemon, node. Run it only like nvm start from the app folder.