A web application that facilitates article creation and management. It's designed with a client-server architecture and React for the frontend (client
) and Node.js with Express for the backend (server
).
Project Setup
Clone the Repository:
shellgit clone https://github.com/kimkorngmao/meatika.git
Install Dependencies:
Navigate to the project root directory and install dependencies for both the client and server sides:
shellcd meatika cd client && npm install && npm run dev #for client cd server && npm install && npm run dev #for server
Configure Server Environment Variables (Required):
-
Create a file named
.env
in theserver
directory. -
Add the following environment variables, replacing placeholders with your actual values:
envPORT=5000 # Port on which the server listens (default: 5000) DB_CONNECT_STR=<your-mongodb-connection-string> JWT_SECRET_KEY=<your-secret-key> ALLOWED_ORIGINS=http://localhost:3000
-
Create a file named
.env
in theclient
directory.envREACT_APP_BASE_URL=http://localhost:5000
Running the Application
Start the Server:
shellcd server npm start
This will start the Node.js server, typically listening on port 5000 (as specified in the .env
file).
Run the Client:
shellcd ../client npm start
This will launch the React development server, usually accessible at http://localhost:3000
by default (depending on your configuration).