Michael Orji
any
(all
), controller
, match
(some
), middleware
, name
, namespace
, permanentRedirect
, redirect
, resource
, view
.env
file@Controller('posts')
annotation specifies that the class is a Controller or if it handles posts
-related routes. To be certain, you have to dig through the documentation. The same thing can be said for the @Get()
annotation.router.get('/{userId}', (req, res)
, you can use the express-specific router.get('/:userId', (req, res)
. Simplicity supports both styles in keeping with the spirit of not getting in the way of what you already use in Express.js.git clone https://github.com/simplicity-js/simplicity
.cd simplicity
.npm install
to install dependencies.git checkout -b pr/your-branch-name
.git remote add upstream https://github.com/simplicity-js/simplicity.git git fetch upstream git branch --set-upstream-to=upstream/main main
main
branch pointing at the original repository while still making pull requests from branches on your fork. To do this, run:main
branch to pull the latest changes from the upstream main branch whenever you run git pull
.main
branch.main
branch, do a regular git pull
. You can push the updated changes to your remote origin master by running git push
.tests
directory within that module. Simplicity scans the entire directory to find files with the .spec.js
extension.npm test
.npm run test:coverage
.npm run lint:fix
to check and automatically fix linting errors. If there are linting errors that cannot be automatically fixed, they are highlighted, so that you can manually fix them.npm run commit
. This will:git push -u remote pr/your-branch-name
.