Skip to content

Commit

Permalink
Add new files and update existing files
Browse files Browse the repository at this point in the history
  • Loading branch information
SDE-ADNAN committed Jan 5, 2024
1 parent 8f8d436 commit 60aee77
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ app.use('/jarvis/admin', adminRoutes);

// for serving clientside react pages ( which are built using "npm run build" or "vite build")
app.use(express.static("public"));
app.use("/*", (req, res) => {
app.use("*", (req, res) => {
res.sendFile(path.join(__dirname, "/public/index.html"))
})

Expand Down
3 changes: 2 additions & 1 deletion server/dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ app.use('/jarvis/admin', admin_1.default);
// app.use('/', (req, res, next) => {
// res.send("<h1>Welcome to todo backend </h1>")
// })
// for serving clientside react pages ( which are built using "npm run build" or "vite build")
app.use(express_1.default.static("public"));
app.use("/*", (req, res) => {
app.use("*", (req, res) => {
res.sendFile(path_1.default.join(__dirname, "/public/index.html"));
});
mongoose_1.default
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.013f3146.css",
"main.js": "/static/js/main.c0b23865.js",
"main.js": "/static/js/main.5bd47464.js",
"static/media/bgfinaldark.jpg": "/static/media/bgfinaldark.b0e59fa0ba58246be184.jpg",
"static/media/bgfinallight.jpg": "/static/media/bgfinallight.4f070915fbd0bf061862.jpg",
"static/media/add.png": "/static/media/add.90b950d171bb0b3986d1.png",
Expand All @@ -14,10 +14,10 @@
"static/media/subtask.svg": "/static/media/subtask.0aee0a3293406f3c959e65a1925a9502.svg",
"static/media/rightarrow.svg": "/static/media/rightarrow.87f8be47de5397f44ad09947d6186828.svg",
"main.013f3146.css.map": "/static/css/main.013f3146.css.map",
"main.c0b23865.js.map": "/static/js/main.c0b23865.js.map"
"main.5bd47464.js.map": "/static/js/main.5bd47464.js.map"
},
"entrypoints": [
"static/css/main.013f3146.css",
"static/js/main.c0b23865.js"
"static/js/main.5bd47464.js"
]
}
File renamed without changes.
2 changes: 1 addition & 1 deletion server/public/index.html → server/dist/public/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="/manifest.json"/><title>Todo App</title><script defer="defer" src="/static/js/main.c0b23865.js"></script><link href="/static/css/main.013f3146.css" rel="stylesheet"></head><body><div id="root"></div><div id="modal-root"></div><div id="loader"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="/manifest.json"/><title>Todo App</title><script defer="defer" src="/static/js/main.5bd47464.js"></script><link href="/static/css/main.013f3146.css" rel="stylesheet"></head><body><div id="root"></div><div id="modal-root"></div><div id="loader"></div></body></html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions server/dist/public/static/js/main.5bd47464.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "./dist/app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "cd ../admin-client && sudo rm -rf ../server/public && sudo mkdir -p ../server/public && cd ./build && sudo cp -r * ../../server/public && cd ../../server && node ./dist/app.js",
"start": "cd ../admin-client && sudo rm -rf ../server/dist/public && sudo mkdir -p ../server/dist/public && cd ./build && sudo cp -r * ../../server/dist/public && cd ../../server && node ./dist/app.js",
"dev": "NODE_ENV=development nodemon ./dist/app.js"
},
"repository": {
Expand Down
3 changes: 0 additions & 3 deletions server/public/static/js/main.c0b23865.js

This file was deleted.

0 comments on commit 60aee77

Please sign in to comment.