Init commit
This commit is contained in:
commit
6cf94537a4
4 changed files with 37 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Node stuff
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
13
app.js
Normal file
13
app.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
let express = require("express");
|
||||
let morgan = require("morgan")
|
||||
let app = express();
|
||||
|
||||
app.use(morgan("dev"))
|
||||
.use(express.static("public"))
|
||||
.set("view engine", "pug")
|
||||
.get("/", (req, res) => {
|
||||
res.render("index");
|
||||
});
|
||||
|
||||
app.listen(8080)
|
||||
|
12
package.json
Normal file
12
package.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "image_node",
|
||||
"version": "0.1.0",
|
||||
"description": "A light web image uploader",
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"express": "^4.17.1",
|
||||
"morgan": "^1.10.0",
|
||||
"pug": "^2.0.4"
|
||||
},
|
||||
"author": "flifloo"
|
||||
}
|
8
views/index.pug
Normal file
8
views/index.pug
Normal file
|
@ -0,0 +1,8 @@
|
|||
doctype html
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
title Image Node
|
||||
body
|
||||
h1 Image Node
|
||||
|
Loading…
Reference in a new issue