From 6cf94537a4b788566da9c67db543fd808e72323f Mon Sep 17 00:00:00 2001 From: flifloo Date: Sun, 26 Apr 2020 15:22:43 +0200 Subject: [PATCH] Init commit --- .gitignore | 4 ++++ app.js | 13 +++++++++++++ package.json | 12 ++++++++++++ views/index.pug | 8 ++++++++ 4 files changed, 37 insertions(+) create mode 100644 .gitignore create mode 100644 app.js create mode 100644 package.json create mode 100644 views/index.pug diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f7041d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Node stuff +node_modules +package-lock.json + diff --git a/app.js b/app.js new file mode 100644 index 0000000..4aabb95 --- /dev/null +++ b/app.js @@ -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) + diff --git a/package.json b/package.json new file mode 100644 index 0000000..11565d5 --- /dev/null +++ b/package.json @@ -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" +} diff --git a/views/index.pug b/views/index.pug new file mode 100644 index 0000000..3845d54 --- /dev/null +++ b/views/index.pug @@ -0,0 +1,8 @@ +doctype html +html(lang="en") + head + meta(charset='utf-8') + title Image Node + body + h1 Image Node +