Installation
This project was bootstrapped using Create React App meaning that it is equiped with built-in scripts that get your application up and running. This makes it easier for you to get started with React and have a working application with minimal effort. But, before running these scripts, you'll need to make sure you have the following tools installed:
| Tools | Version | Description |
|---|---|---|
| Node.js | v16.17.0 | Node.js is a JavaScript runtime that lets you easily build fast, scalable network applications. |
| npm | 8.15.0 | npm is a widely used JavaScript package manager that makes it easy to install, update, and manage dependencies in your projects. |
| yarn | 1.22.19 | Like npm, Yarn is yet another JavaScript package manager. It is a newer than npm and offers several advantages over it, including a slightly better performance and security. |
Once you have git, Node.js and one of the package managers installed, you should be good to go! Now you need to fork and clone the repository:
- Fork the Brave Date repo on GitHub.
-
Clone your forked repo locally:
git clone git@github.com:your_name_here/brave-date.git
-
Open the newly created directory:
cd brave-date
In order to run the project locally or build for production use, you will need to set the following environment variables to connect with the server:
REACT_APP_SERVER_URL=http://localhost:8000/api/v1 REACT_APP_SOCKET_URL=ws://localhost:8000/api/v1/ws
You can now execute the following commands:
| Command | Description |
|---|---|
npm install or
yarn install
|
This command will install everything that's needed in the node_modules folder, so you won't have to worry about doing it manually. Plus, it's a lot faster than installing each dependency individually. |
npm start or
yarn start
|
This command will start the server at
http://localhost:3000 and
watch for any changes in your code. This is
a great way to develop and test your code
before putting it live.
|
npm build or
yarn build
|
This command will generate a
/dist directory containing all
of the files you need to deploy your
project.
|
npx serve -s build
|
Serve the statically generated html files on localhost. |