Before you can compile the project, you need to create configuration files.
Types of configuration files:
.env.production
- production configuration.env.development
- development configuration.env.testing
- testing configuration
Configuration files should be placed in src/client
directory.
The structure is the following:
VITE_API_BASE_URL=http://localhost:4000/api
Types of configuration files:
.env
- production configuration.env.development
- development configuration.env.testing
- testing configuration
Configuration files should be placed in src/server
directory.
The structure is the following:
PORT=4000
MONGODB_URI=full connection URI
- Navigate to
src/client
directory - Run
npm install
- Run
npm run build
After frontend is compiled, you can compile backend.
- Navigate to
src/server
directory - Run
npm install
- Run
npm run build
OR - Start the server with
npm run start
Now the server is running on port defined within .env
file. Make sure that Frontend is running on the same port.
- Navigate to
src/client
directory - Run
npm install
- Run
npm run dev
- Navigate to
src/server
directory - Run
npm install
- Run
npm run start:dev
Allows to search for events by the following attributes:
- id
- name
- sort by attribut
- sort order
Allows to navigate through pages of events. The navigation buttons are visible directly under the search bar.
Make sure that you have correct .env files located in the root directories.