Skip to content

Commit 1f401fc

Browse files
Updated on 8 Sep 2023
1 parent 9f3d3db commit 1f401fc

File tree

751 files changed

+93686
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

751 files changed

+93686
-0
lines changed

app.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const port = 4040
2+
const express = require('express')
3+
const app = express()
4+
const morgan = require('morgan')
5+
6+
//const postRoutes =require('./routes/post')
7+
8+
//using destructuring method
9+
const { getPosts } = require('./routes/post')
10+
11+
// const myOwnMiddleWare = (req, res, next) => {
12+
// console.log("my own ")
13+
// next()
14+
// }
15+
16+
// app.use(myOwnMiddleWare)
17+
18+
app.use(morgan('dev'))
19+
20+
app.get("/", getPosts)
21+
app.listen(port, () => [
22+
console.log(`Server listening on port : ${port}`)
23+
])

node_modules/.bin/mime

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/node

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/nodemon

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/nodetouch

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/nopt

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/semver

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)