Skip to content

Commit 08d1c31

Browse files
committed
Hello, World 🌎
0 parents  commit 08d1c31

File tree

4 files changed

+426
-0
lines changed

4 files changed

+426
-0
lines changed

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

‎app.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const express = require('express')
2+
3+
const app = express()
4+
const port = parseInt(process.env.PORT || '3000', 10)
5+
6+
app.use(require('morgan')('dev'))
7+
8+
app.get('/', (_, res) => {
9+
res.send('Hello World!')
10+
})
11+
12+
app.listen(port, () => {
13+
console.log(`Example app listening at http://localhost:${port}`)
14+
})

‎package.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "express-hello-world",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "node ./app.js"
7+
},
8+
"dependencies": {
9+
"express": "^4.16.1",
10+
"morgan": "^1.9.1"
11+
},
12+
"engines": {
13+
"yarn": "1.22.4"
14+
}
15+
}

0 commit comments

Comments
 (0)