mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 17:25:21 +00:00
Splitted Webserver from operative module
This commit is contained in:
17
server.js
Normal file
17
server.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const express = require("express");
|
||||
const { RequestHandler } = require("./index")
|
||||
|
||||
const instance = express();
|
||||
|
||||
instance.use(express.json());
|
||||
|
||||
instance.listen(80, "0.0.0.0", function(request, response) {
|
||||
console.log("Listening on 80");
|
||||
});
|
||||
|
||||
instance.get("/", function (request, response) {
|
||||
response.send("Hello there!");
|
||||
});
|
||||
|
||||
instance.get("/gen/:type/", RequestHandler);
|
||||
instance.post("/gen/:type/", RequestHandler);
|
||||
Reference in New Issue
Block a user