Skip to content

Commit

Permalink
json server config
Browse files Browse the repository at this point in the history
  • Loading branch information
lemanhjcuongdev committed May 9, 2024
1 parent a4462cc commit c65e8c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data.length !== 0 ? data : setLocalStorage(keyLocalStorageListSP, listData);

import jsonServer from "json-server"; // importing json-server library
const server = jsonServer.create();
const router = jsonServer.router("./backend/db.json");
const router = jsonServer.router("db.json");
const middlewares = jsonServer.defaults();
const port = process.env.PORT || 8080; // chose port from here like 8080, 3001

Expand Down

0 comments on commit c65e8c1

Please sign in to comment.