Created
April 3, 2018 07:39
Revisions
-
Raaj Ahiable created this gist
Apr 3, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ const express = require('express'); const bodyParser = require('body-parser'); const multer = require('multer'); const app = express(); app.get('/api', (req, res) => { res.send('Welcome to our upload server. Have a nice ride') }); app.post('/api/upload', (req, res) => { console.log('Upload hit') }); app.get('*', (req, res) => { res.send('Mmmm, you must be lost. We have no such route') }); app.listen(8080, () => { console.log('Server started on http://localhost:8080') });