added some mocked data calls

This commit is contained in:
robert
2021-07-06 12:27:18 +01:00
parent 5f7a572b91
commit 2c716ff5c5
21 changed files with 828 additions and 11590 deletions
+25
View File
@@ -0,0 +1,25 @@
const { createServer } = require('https');
const { parse } = require('url');
const { readFileSync } = require('fs');
const next = require('next');
const port = 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
const httpsOptions = {
key: readFileSync('./certificates/privateKey.key'),
cert: readFileSync('./certificates/certificate.crt')
};
app.prepare()
.then(() => {
createServer(httpsOptions, (req, res) => {
const parsedUrl = parse(req.url, true);
handle(req, res, parsedUrl);
}).listen(port, err => {
if (err) throw err;
console.log(`> Ready on https://localhost:${port}`);
})
});