This project uses Next.js for the frontend. There are two methods that you could use to set up the development environment. One is to set up the environment locally in your machine which requires certain pre-requisites to be installed on your machine. The Second method is to use docker. The following are the steps outlined to do the same.
-
Node.js: A JavaScript runtime environment
-
NPM: Node Package Manager to install packages. Please Note that installing Node.js automatically installs NPM on your machine
-
Git: To clone the repository and for Version Control
- First Make sure that the above pre-requisites are installed successfully, by typing the following commands on the command line
node -v
npm -v
git -v- Clone the repository
git clone https://github.com/MS-Girls/CLIMB-FE- Navigate to the frontend directory and install the packages
cd CLIMB-FE
npm install- Set up environment variables
Create a .env file and the add the following environment variables
NEXT_PUBLIC_BACKEND_URL=- To Start the server for development execute
npm run dev- To Start the server for production execute
npm run build
npm run start- Navigate to your browser hit
http://localhost:3000to access your frontend
-
Just make sure that docker is installed your system by typing the command
docker -von your command line -
Also you require Git to be installed inorder to clone the repository
- Clone the repository and navigate to the frontend
git clone https://github.com/MS-Girls/CLIMB-FE
cd CLIMB-FE- Set up environment variables
Create a .env file and set up the environment variables
- To build docker image and start the container execute
docker build --build-arg NEXT_PUBLIC_BACKEND_URL=<your-backend-baseurl> -t CLIMB-frontend:latest .
docker run -d -p 3000:3000 --env-file .env --name CLIMB-frontend CLIMB-frontend:latest- Navigate to your browser hit
http://localhost:3000to access your frontend