mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
back to localhost
This commit is contained in:
@@ -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
8
server/now.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"name": "todo-server",
|
||||
"builds": [{ "src": "*.js", "use": "@now/node-server" }],
|
||||
"env": {
|
||||
"NODE_ENV": "production"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user