1. You can start by cloning the repository on your local machine by running:
git clone https://github.com/mAbadsa/upet-form.git
cd upet-form
2. Install all of the dependencies:
yarn run project-setup
3. Database Setup: 📋
-
If you have mongo skip this step. Connect to local mongoDB server
- Install mongodb database
- instructions on how to install mongoDB
- instructions on how to install MongoDB Shell
- Connect to a MongoDB Server on Your Local Machine Connect to cloud mongoDB
- Get Started with Atlas
-
Open your terminal, run
mongo
:
- run use <YOUR_DATABASE_NAME>
- Install ORM, we will use mongoose
- react mongoose document to connect to the local mongoDB
local server
mongoose.connect('mongodb://localhost:27017/myapp');
could server use your database url from your atlas accountmongoose.connect('mongodb://username:password@host:port/database?options...')
;
- react mongoose document to connect to the local mongoDB
local server
4. Environment variables:🔑
- create .env file
- add your Environment variables
MONGO_DB= # Your mongodb atlas uri PORT= # 8080
5. run the app locally:🔌 In the main directory
yarn run run-both
Now the app should be running at http://localhost:8080