-
This workshop was written in node
11.14.0
. While it should be compatible with later versions of node, if you do have any issues it is worth installing this version specifically. If you have Node Version Manager (NVM) installed you can use the commandnvm use
to switch to this version. If you don't have11.14.0
installed it will prompt you to install it with the commandnvm install 11.14.0
. -
Copy the contents of
.env.example
into a new file.env
in the root directory. The tests will not pass unless you do this. This configures the app to point to the API service URL.
โ ๏ธ ๐จ Please do not use npm. We used yarn while building the project, and while testing it with npm we found issues during installation. Please use yarn instead of npm ๐จโ ๏ธ
Here are instructions to install Yarn on MacOS.
Here are instructions to install Yarn on Windows.
Install all required dependencies to run this application.
Runs the app in the development mode.
- Open http://localhost:3000 to view it in the browser.
- The app will update as you make changes without reloading thanks to HMR!
- Lint errors will be displayed in the console.
- Running this command will also start the api server http://localhost:3001/pets
GET http://localhost:3001/pets Returns all the pets.
Run the linter
Run the linter and attempt to fix errors.
Run tests in Jest watch mode.
Run tests in Jest watch mode with coverage.