The web client for Profs To Pick.
Some requirements include:
Afterwards, clone, and then run the following to install the dependencies:
npm install
bundle install| command | description |
|---|---|
npm run watch:script |
watch for file changes and compile scripts |
npm run watch:style |
watch for file changes and compile stylesheets |
npm run dev |
runs watch:script and watch:style |
npm run server |
run server-side rendering |
npm start |
production-ready assets / run server |
npm watch:test |
watches for file changes and runs test |
npm test |
run tests |
We use dotenv configuration.
Note: If you don't have any .env file in the project root directory, run this: cp .env.example .env.
| config | description |
|---|---|
process.env.NODE_ENV |
Environment. |
process.env.API |
The URI of the API. Mainly used to concatenate the requests with a base URI in common/utils/axios/interceptors/concatBaseUrl. |
process.env.IMG |
Path to the images folder. This can be used as such : ${_IMG_}/cat.jpg. |
process.env.PORT |
The port which the server will be ran. This is a server-only config. |
process.env.REDUX_DEVTOOLS |
Condition which Redux Devtools will be enabled. |
Gotchas: To set a config to false, leave it empty.
# wrong
REDUX_DEVTOOLS=false
# correct
REDUX_DEVTOOLS=- 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.
- Use
app/*(e.g.,import 'app/some-file.js') for directories that are two levels away (../../module/some-file=>app/module/some-file`)
- Use
.to signify a nest in route (e.g.,dashboard.home)- Either nested view (
dashboardas parent route) - Or path (
/dashboard/home)
- Either nested view (
- Use
-to split routes with multiple words (e.g.,hello-world)
- This repository follows ducks-modular-redux.