Muskoka District Rentals is a Progressive Web Application for renting properties in the Muskoka district of Canada.
Muskoka District Rentals is built using the GatsbyJS framework, and uses Zeit Now for deployments.
The following components are required to run the project (tested on Arch Linux):
- NodeJS (version ~11.14.0). A javascript runtime
built on Chrome's V8 JavaScript engine. (How to verify? Run
node --version
.). If you have a different version use nvm to install version 11.14.0.
- Clone the GitHub repository:
git clone git@github.com:the-mmm-agency/muskoka-district-rentals
. - Switch to the project directory:
cd muskoka-district-rentals
. - Run
npm install
to install dependencies. - Start Muskoka with
npm start
. - Muskoka should now be running at
http://localhost:8000
.
Gatsby exposes the GraphQL playground at
http://localhost:8000/___graphql
. For more information refer to the
GatsbyJS Docs.
If you wish to run Muskoka with ssl enabled use npm run develop:ssl
Gatsby
takes care of generating the certificates.
To verify that everything is working properly you can run the project's tests.
Install the projects dependencies with npm install
.
- For unit testing build the project with
npm run build
.
Unit tests can be run with npm test
.
- If you wish to run the tests in watch mode replace
npm test
withnpm run test:watch
.
- To start a development server and open a Cypress window with screenshot
validating and hot reloading use
npm run test:e2e:dev
. - To start a development server and run cypress tests in the command line use
npm run test:e2e:run
.
Other npm scripts not mentioned above.
npm run format
formats the code with Prettier.npm run lint
runs code linting with Eslint.npm run lint:fix
runs code linting with Eslint. Attempting to automatically fix issues.npm run lint:styles
lints styled-components templates with stylelint.npm run lint:styles:fix
lints styled-components templates with stylelint. Attempting to automatically fix issues.npm run serve
serves a static build built withnpm run build
.