This week we used the servor
npm package to serve our single-page applications with front-end routing so we could render all our endpoints from one index.html
.
I was having trouble running our application server locally on the correct port. The syntax from the servor
docs is that it needs to know the following: <root> <fallback> <port>
, so I had to add the below to my package.json
file.
"scripts": { "dev": "servor . index.html 3000" },