From eaac6a03d1fdf816f83e04552707e263e11bd3f5 Mon Sep 17 00:00:00 2001 From: Christopher Rose Date: Sun, 19 May 2019 13:08:23 +0530 Subject: [PATCH] Push middleware basics --- index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0746f21..8ec08f5 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,15 @@ app = express() app.use(bodyParser.urlencoded({extended:false})) app.use(bodyParser.json()) -app.post('/filepath') +//Attempt to upload a file +app.put('/files/upload',(req,res)=>{ + console.log("Upload attempted") +}) + +//Get file details +app.post('/files/ls',(req,res)=>{ + console.log("Request attempted") +}) app.get('/',express.static('static'));