Home Industry Admin
A local e-commerce application created for ease of buying and selling transactions.
Table of Contents
- Prepare Environment
- Running Development Mode With Docker (Recommended)
- Running Development Mode Without Docker (Optional)
- References
Prepare environment
Before starting development, you need to create a .env_var
file in the root folder. Inside the .env_var
file, put
REACT_APP_BASE_URL=https://pilar-be-staging.cs.ui.ac.id
Running Development Mode with Docker (Recommended)
The recommended way of serving the frontend is to utilize Docker. To build and run the container image in Docker:
docker-compose up -d --build
If you have an existing image from a previous build you can instead run:
docker start pilar-web
To stop the running container:
docker stop pilar-web
Running Development Mode without Docker (Optional)
If your system doesn't support Docker, you can install the required packages and serve the frontend directly without a container. The Admin Website's frontend uses Node.js and is developed using React. You need to install the required dependencies prior to building and contributing to the project.
- Node.js and npm package manager
Verify that Node.js has been successfully installed. Make sure the interpreter can be invoked from the shell. For example:
npm --version
Now install the packages required for Node.js:
npm install
After the required dependencies are installed you can start the development server with:
npm start
You can see the app running by going to localhost:1234 via your favourite web browser.
If you want to see the production version of the server you can instead run:
npm run build
When using start
the server will have hot-reload, this is recommended for development. However, to see the end product the build
version will have bundled code and will detect any production-breaking code.