Team Members: Cecelia Peterson, Harry Le, Matthew McJoynt, Prasoon Sinha, Riza Hassan, Walt Boettge
To see working product without installation and configuration, checkout this link (deployed on Heroku).
Website allowing customers get COVID-19 information about local Madison restaurants. Restaurants can create accounts to give potential customers access to information like their safety policies and live capacity.
- Install Git/GitBash (https://git-scm.com/downloads), Node.js (https://nodejs.org/en/).
- If this file is being viewed outside of the git repository, reach out to Prasoon Sinha with a git username to get access.
- Clone the repository.
Run:git clone https://github.com/psinha25/covid-19-restaurant-system.git
- Change directory to project (either use command or open VSCode at the project folder).
Run:cd covid-19-restaurant-system
- On terminal, check you are on the right working directory by running the following.
Run:pwd
You should see[whatever path leading up to this]/covid-19-restaurant-system
- Create .env file for secret information.
Run:touch .env
- Paste this in .env file.
...
Reach out to Harry for the content of this file. - Install backend dependencies.
Run:npm install
- Change directory to client.
Run:cd client
- Install frontend dependencies.
Run:npm install
- Change directory back to project.
Run:cd ..
- Launch both the server and client (both backend and frontend).
Run:npm run dev
- A browser window should open to localhost:3000.
- To log in as a restauarant, reach out to Harry for a username and password.
Selenium runs using the .side files found in /test/client/. These can be run directly using the selenium browser extension, or via the command line using selenium-side-runner
.
To run all frontend tests using the command line:
- Navigate to the project directory
- Run
npm run seeds
. This will ensure the database is in a known state before running the tests. Be careful -- this will overwrite the current database! - Run
npm run dev
to launch the server. - Open another terminal window and run
npm run frontend-test
, again in the project directory. This will cause the selenium tests to be run.
Alternatively, if selenium-side-runner
is installed, the .side files can be run directly. Check if the package is installed by running selenium-side-runner --version
. If it is not installed, run npm install -g selenium-side-runner
. Additional dependencies might also need to be installed, such as jest and webdriver
- Frontend tests.
Run:cd client
Run:npm run test
- Frontend coverage.
Run:cd client
Run:npm run coverage
Backend tests are written using Mocha as test framework, Chai as assertion library, and Supertest to make requests. Tests can be found inside /test folder in the project directory.
- Backend tests.
Run:npm run test
- Backend coverage.
Run:npm run coverage