Reputation: 195
I'm trying to run 'npm start' from a file : test.js . I get :
(function (exports, require, module, __filename, __dirname) { npm start
^^^^
SyntaxError: Unexpected identifier
The content of test.js :
npm start
What I'm trying to achieve is to avoid starting my node server with npm start directly in the shell and start it with:
node test.js
And programmatically restart my node server at three differents hours a day.
I'm not node expert. Can anyone help me or give me ideas to achieve this ? Thank you.
Upvotes: 0
Views: 1165