I've been messing around with codesphere lately and have a weird issue, at least to me:
my server.js:
const express =require('express');
const app = express();
const port = 8000;
app.get('/', (req,res) => { res.send('Hi there')
});
app.listen(port, () => { console.log("Running")
});Upon npm start :
user@codesphere:app [master] $ npm start[email protected] start /home/user/app
node server.jsthen the output exits the server and returns to CLI
Output for running node server.js:
Another edit:
upper part, my package.json in their ide, lower part: package.json open in terminal (nano)
Now I actually think, it is save to assume they have trouble!
6 Related questions
3 node.js server not running 0 Node.js server not working 3 Node won't run, just exits code 0 Related questions
3 node.js server not running 0 Node.js server not working 3 Node won't run, just exits code 0 3 why node.js process is killed? 1 node - Nothing happens when running a script 2 node.js server won't start 1 Stuck at starting 'node server.js' .. won't get any output. What's the issue? 2 NodeJS exiting prematurely 0 Node Server not working in console Node Js 0 Node.js server just keeps loading with no result Load 7 more related questions Show fewer related questions Sorted by: Reset to default Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.