If you don't have node yet, install using nvm
$ npm -g install yarn
$ yarn install
# start mongodb from docker
$ yarn start:mongo
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
This project use standardjs code style
This project has configured eslint + prettier
to follow the standardjs code style
If you use VSCode add the following to your settings to autoformat on save
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
]
This project is going to use conventionalcommits as commit format to help us create changelogs
git commit -m "chore: update dependencies"
Install commitizen as global utility
yarn global add commitizen cz-conventional-changelog
Create a .czrc
file in your home directory, with path
referring to cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
Commiting with commitizen prompt
with this approach use always the terminal
If the commands doesn't work add the following line
export PATH="$PATH:$(yarn global bin)"
to your .bashrc or .zshrc
TypeScript is a superset of JavaScript which primarily provides optional static typing, classes and interfaces
A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript.
Apollo Server is the best way to quickly build a production-ready, self-documenting API for GraphQL clients, using data from any source
GraphQL is a syntax that describes how to ask for data, and is generally used to load data from a server to a client
Allow us to create GraphQL schema and resolvers with TypeScript, using classes and decorators
MongoDB is a document database with provide us scalability and flexibility
Typegoose is a wrapper for mongoose’s models
Mongoose provides a straight-forward, schema-based solution to model our application data