Eric Whale

Setup npm script for client/server

......@@ -14,8 +14,7 @@ const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<BrowserRouter>
<Routes>
// root route is for chatroom
<Route path="/" element={<App />} />
<Route path="/" element={<App />} /> // App = chatroom
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/userroom" element={<Userroom />} />
......
This diff is collapsed. Click to expand it.
......@@ -5,7 +5,9 @@
"main": "server.js",
"scripts": {
"start": "node server.js",
"server": "nodemon server.js"
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run client\" \"npm run server\""
},
"repository": {
"type": "git",
......@@ -23,6 +25,7 @@
"mongoose": "^6.3.4"
},
"devDependencies": {
"concurrently": "^7.2.1",
"nodemon": "^2.0.16"
}
}
......