Skip to content

Commit 93e7bbc

Browse files
authored
Add React build process for full-stack deployment
- Integrated React app in a 'client' directory and added a build script in the root package.json to build the frontend. - Updated package.json with "build" script to navigate to the client directory, install dependencies, and run npm build. - Configured Express server to serve static files from the React build directory, enabling full-stack deployment from a single server. - Ensures production-ready React files are served alongside the Node.js backend for streamlined deployment. This setup supports building and deploying both frontend and backend in a full-stack environment.
1 parent a7e32ce commit 93e7bbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "ai-object-recognition",
33
"version": "1.0.0",
4-
"description": "A complex Node.js project",
4+
"description": "An AI-powered full-stack application",
55
"main": "index.js",
66
"scripts": {
7+
"build": "cd client && npm install && npm run build",
8+
"start": "node index.js",
79
"test": "echo \"No tests specified\" && exit 0"
810
},
911
"author": "Project Code Dev Team",

0 commit comments

Comments
 (0)