Skip to content

Commit 7c38075

Browse files
Server hosting files for todo
1 parent 96d3aab commit 7c38075

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Lecture10/todoapi/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const express = require('express')
2+
3+
const app = express()
4+
5+
const todoRoute = require('./todos')
6+
7+
let todos = []
8+
9+
app.use(express.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded
10+
11+
app.use('/todos', todoRoute)
12+
13+
app.listen(3000, function () {
14+
console.log("Running on 3000")
15+
})

0 commit comments

Comments
 (0)