Commit 6fc84be2 authored by LasseKau's avatar LasseKau
Browse files

nodemon config

-
parent d6b8c072
const express = require('express');
const app = express();
// with "/", it just goes to url. when you say app.get, you pass the route, then the paprameters of a function.
// req = require, when we want to get info from frontend
// res = response, when we want to send info to frontend,
app.get("/", (req, res)=> {
res.send('hello world'); //testing sending to server
})
// we want to listen to server, passing port 3001 since localhost is running 3000
app.listen(3001, () => {
//console.log("running port 3001"); //testing to make sure server is working
})
\ No newline at end of file
......@@ -4,6 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"devStart": "nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment