Skip to content

Commit 6918b59

Browse files
committed
add small fix
1 parent a2e080b commit 6918b59

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

model/index.js renamed to models/contacts.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// const fs = require('fs/promises')
2-
// const contacts = require('./contacts.json')
32

43
const listContacts = async () => {}
54

File renamed without changes.

nodemon.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"ignore": ["node_modules", "model/contacts.json"]
2+
"ignore": ["node_modules", "models/contacts.json"]
33
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6-
"start": "cross-env NODE_ENV=production node ./bin/server.js",
7-
"start:dev": "cross-env NODE_ENV=development nodemon ./bin/server.js",
6+
"start": "cross-env NODE_ENV=production node ./server.js",
7+
"start:dev": "cross-env NODE_ENV=development nodemon ./server.js",
88
"lint": "eslint **/*.js",
99
"lint:fix": "eslint --fix **/*.js"
1010
},

routes/api/contacts.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const express = require('express')
2+
23
const router = express.Router()
34

45
router.get('/', async (req, res, next) => {

bin/server.js renamed to server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const app = require('../app')
1+
const app = require('./app')
22

3-
const PORT = process.env.PORT || 3000
3+
const {PORT = 3000} = process.env
44

55
app.listen(PORT, () => {
66
console.log(`Server running. Use our API on port: ${PORT}`)

0 commit comments

Comments
 (0)