aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-04-13 12:06:02 +0200
committerache <ache@ache.one>2018-04-13 12:06:02 +0200
commite1aded8b57736a0532804693c8cafcdb0c497a7f (patch)
treee9103e9c5ddf0db76fc00009b6da24ad5cff424d
parentCreation d'un package rollup Buddle Web Editor (diff)
Integration of the bundle editor
-rw-r--r--app.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/app.js b/app.js
index 2e7c8d0..a59723c 100644
--- a/app.js
+++ b/app.js
@@ -102,7 +102,15 @@ app.get('/', (req, res) => {
res.send(data);
});
});
-
+app.get('/edit', (req, res) => {
+ console.log(`[${new Date()}] > ${200} - ${req.url}`);
+ fs.readFile('public/edit.html', 'utf8', (err, data) => {
+ if (err) {
+ return console.log(err);
+ }
+ res.send(data);
+ });
+});
app.get('*', (req, res) => {
console.error(`[${new Date()}] > ${404} - ${req.url}`);
fs.readFile('public/404.md', 'utf8', (err, data) => {