Skip to content

Commit

Permalink
minor adjustments to app.js/netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
ZinxValkyria committed Jan 30, 2024
1 parent 62be36c commit cb54beb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ app.get('/api/character', async (req, res) => {
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});

module.exports = app;
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# netlify.toml
[build]
command = "npm run build"
functions = "server"
functions = "app.js"

[[redirects]]
from = "/*"
to = "/.netlify/functions/server/:splat"
to = "/.netlify/functions/app/:splat"
status = 200
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev" : "npm install && nodemon app.js",
"dev" : "npm start && nodemon app.js",
"start": "node app.js",
"build": " echo 'No build process needed for Express app'"
"build": "npm install"

},
"author": "",
Expand Down

0 comments on commit cb54beb

Please sign in to comment.