I'm using this boilerplate: http://ift.tt/2DZsD9w saw an instance of express in server.js so I tried setting a simple route there.`const express = require('express') const app = express() app.get('/status', (req, res) => { res.send({ message: 'Hello registrant!' }) }) `So then, i visit localhost:4000/status to see if it returns the message as expected. (webpack-dev-server listens to port 4000)but then nothing happens. A blank index.html appears. Weird thing is when i visit localhost:4000/sgwewenjtasdjn, the same thing happens instead of prompting me that the route doesn't exist.question: what am I doing wrong? Why is localhost:4000 not showing vue components????EDIT: Ok I tried app.listen to port 4000 instead of the webpack-dev-server listening to 4000 and the route worked. What exactly is webpack-dev-server and why does it need to listen to some port?
Submitted February 04, 2018 at 06:19AM by o1_complexity
No comments:
Post a Comment