Create LOCAL - .env file
and add "NODE_ENV=development"
Note: the docker is not properly set up.
To set up the development environment, you need to install the following dependencies:
-
Node.js and npm:
- You can download Node.js and npm from nodejs.org.
-
Gatsby:
- To install Gatsby, run the following command in your terminal:
npm install -g gatsby
- To install Gatsby, run the following command in your terminal:
-
JSON Server:
- To install JSON Server, run the following command in your terminal:
npm install -g json-server
- To install JSON Server, run the following command in your terminal:
After installing the dependencies, you can set up and run the application:
-
Install project dependencies:
- Run the following command in your project directory to install the required dependencies:
npm install
- Run the following command in your project directory to install the required dependencies:
-
Start the Gatsby development server:
- To start the Gatsby application, run the following command:
gatsby develop
- To start the Gatsby application, run the following command:
-
Start the JSON Server for API:
- To start the JSON Server for your API, use the following command:
json-server --watch json-server/db.json --port 3001
- This is important as this is the server that holds all the puppy data and adopter data
- To start the JSON Server for your API, use the following command:
-
Open the app on
http://localhost:8000/
Some notes:
- The Puppy and Adopters data is saved in
pups\app\json-server
. This serves as the api server
Now, your development environment should be set up and both the Gatsby application and JSON Server should be running.