Welcome to the Expense Management System project! This full-stack application consists of both front-end and back-end components, with the front-end named "client" and the back-end named "Back-end."
To start the front-end of the application, follow these steps:
-
Create a React app for the client-side:
npx create-react-app client
-
Install the necessary npm packages:
npm install react antd moment axios @ant-design/icons
-
Launch the front-end development server:
cd client npm start
This will open the front-end application in your default web browser.
To run the back-end or server-side of the application, proceed with these steps:
-
Initialize a Node.js app and set it up:
npm init --yes
-
Install the required packages for the back-end:
npm install express mongoose dotenv cors morgan colors nodemon concurrently
-
Configure the "server" script in the
package.json
file to enable auto-reloading using Nodemon:"scripts": { "server": "nodemon server.js" }
-
Start the back-end server:
npm run server
Your back-end server will be up and running.
To simultaneously run both the front-end and back-end, follow these instructions:
-
Configure the client-side proxy to communicate with the back-end: Add the following line to the client's
package.json
file:"proxy": "http://localhost:8080/"
Note that the back-end is accessible on port 8080.
-
Set up the necessary scripts in the back-end
package.json
for starting both the server and client concurrently:"scripts": { "client": "npm start --prefix ../client", "dev": "concurrently \"npm run server\" \"npm run client\"" }
-
Run the application in development mode:
npm run dev
Both the front-end and back-end will be launched concurrently.
Please ensure that you adapt these instructions to your project's specific file structure and requirements. This README provides a comprehensive guide to setting up and running the Expense Management System project.