Skip to content
Snippets Groups Projects
Commit 0f6d6eb4 authored by Anni Eskelinen's avatar Anni Eskelinen
Browse files

3.1

parents
Branches
No related tags found
No related merge requests found
node_modules/
\ No newline at end of file
index.js 0 → 100644
const express = require('express')
const app = express()
let notes = [
{
"name": "Buy some eggs",
"timestamp": "2021-11-10T13:00:00.141Z",
"id": 1
},
{
"name": "Make an omelette",
"timestamp": "2021-11-11T08:00:00.141Z",
"id": 2
},
{
"name": "Wash dishes",
"timestamp": "2021-11-11T09:00:00.000Z",
"id": 3
},
{
"name": "Buy more eggs",
"timestamp": "2021-11-11T13:00:00.000Z",
"id": 4
}
]
app.get('/api/reminders', (req, res) => {
res.json(notes)
})
const PORT = 3001
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`)
})
\ No newline at end of file
This diff is collapsed.
{
"name": "part4-1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"watch": "nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gitlab.utu.fi/aeeske/web_part4.git"
},
"author": "Anni Eskelinen",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"nodemon": "^2.0.7"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment