Skip to content

Repository files navigation

profs2pick-ui

The web client for Profs To Pick.

Installing

Some requirements include:

Afterwards, clone, and then run the following to install the dependencies:

npm install
bundle install

Development

commanddescription
npm run watch:scriptwatch for file changes and compile scripts
npm run watch:stylewatch for file changes and compile stylesheets
npm run devruns watch:script and watch:style
npm run serverrun server-side rendering
npm startproduction-ready assets / run server
npm watch:testwatches for file changes and runs test
npm testrun tests

Configuration

We use dotenv configuration.

Note: If you don't have any .env file in the project root directory, run this: cp .env.example .env.

configdescription
process.env.NODE_ENVEnvironment.
process.env.APIThe URI of the API. Mainly used to concatenate the requests with a base URI in common/utils/axios/interceptors/concatBaseUrl.
process.env.IMGPath to the images folder. This can be used as such : ${_IMG_}/cat.jpg.
process.env.PORTThe port which the server will be ran. This is a server-only config.
process.env.REDUX_DEVTOOLSCondition which Redux Devtools will be enabled.

Gotchas: To set a config to false, leave it empty.

# wrong
REDUX_DEVTOOLS=false
# correct
REDUX_DEVTOOLS=

Tests

  • Files are named as filename.spec.js.
  • Place test files on the same directory as file being tested.
  • However, if a directory contains several test files, place it in their respective __tests__ folder.

Alias

  • Use app/* (e.g., import 'app/some-file.js') for directories that are two levels away (../../module/some-file=>app/module/some-file`)

Routing

  • Use . to signify a nest in route (e.g., dashboard.home)
    • Either nested view (dashboard as parent route)
    • Or path (/dashboard/home)
  • Use - to split routes with multiple words (e.g., hello-world)

101

About

The web client for Profs To Pick.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages