Expat-Journal BW 2
To setup Dev Environment:
-
in root yarn install,
-
yarn create react-app expat-journal
-
yarn add axios
-
add JSON server in root of expat-journal react app, yarn global add json-server
-
Create components folder in project root/src
-
Create a /img directory in project root
-
configure end-point at localhost:3000/content use this article for a reference https://blog.eleven-labs.com/en/json-server/
-
Run JSON Server on a different port since React will be using 3000, src\data\json-server -p 4000 db.json
-
end points, localhost:3000 React landing Page. localhost:4000/articles localhost:5000/articles
-
Yarn Start in root of /expat-journal
-
Add Styled components. yarn add styled-components
-
Add react-router-dom in the root of expat-journal yarn add react-router-dom
-
yarn add semantic-ui-react
-
To start the app, first navigate to /src/data type json-server -p 4000 landingdata.json, the same with -p 5000 {file name unknown at the moment}
To run the app:
- VS Code terminal > Split terminal > 3 terminals
- first terminal cd src/data
- json server -p 5000 ProfileData.json
- second terminal cd src/data
- json server -p 4000 landingdata.json
- third terminal yarn start
- right click index.hml run with live server