back to localhost

This commit is contained in:
Ken
2019-02-01 10:25:50 -08:00
parent b7b6c590ef
commit 1b7775d784
2 changed files with 9 additions and 1 deletions

View File

@@ -33,6 +33,6 @@ app.post('/todos', (req, res) => {
store.todos = req.body;
});
app.listen(3000, () => {
app.listen(process.env.NODE_ENV === 'production' ? undefined : 3000, () => {
console.log('Listening at http://localhost:3000');
});

8
server/now.json Normal file
View File

@@ -0,0 +1,8 @@
{
"version": 2,
"name": "todo-server",
"builds": [{ "src": "*.js", "use": "@now/node-server" }],
"env": {
"NODE_ENV": "production"
}
}