Skip to content

Commit 40a1f17

Browse files
author
js-jslog
committed
Add express app template
1 parent 0ad4390 commit 40a1f17

File tree

3 files changed

+384
-0
lines changed

3 files changed

+384
-0
lines changed

templates/express-app/app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const express = require('express')
2+
const app = express()
3+
const port = 3000
4+
5+
app.use(function (req, res, next) {
6+
console.log(`Incoming request from ${req.url}`);
7+
});
8+
9+
app.get('/', (req, res) => res.send('Hello World!'))
10+
11+
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
12+

templates/express-app/package-lock.json

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

templates/express-app/package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "express-app-template",
3+
"version": "1.0.0",
4+
"description": "A template to begin a simple express app experiment",
5+
"main": "index.js",
6+
"author": "js-jslog <[email protected]>",
7+
"license": "ISC",
8+
"dependencies": {
9+
"eslint": "^5.16.0",
10+
"eslint-config-airbnb-base": "^13.1.0",
11+
"eslint-plugin-import": "^2.17.2",
12+
"express": "^4.16.4"
13+
}
14+
}

0 commit comments

Comments
 (0)