The back end for LightMVP, running on Express and MongoDB.
Mongoose is also bundled but not currently being used.
Install MongoDB.
Configure .env file so that mongoURI
points to the database.
npm install
npm run dev
The API should be accessible at http://localhost:3000/api/ (default port).
GET api/game_data/user/{username}
- Fetch user data from the database.
POST api/game_data/user/{username}
- Inserts user data into the database, if user already exists, it will overwrite.
From here you should be able to dissect the recentMatches
object for the data you need.
Your call to action should redirect to /auth/twitch
.
An entry will be created in the collection user-profile
If you have run the init script, you can commit via
git cz
.
If you have not run the init script, you must commit vianpm run commit
.
If you do neither, commit message consistency will be difficult for you.
This repository uses a combination of tools to aid in consistent commit messages. The reason we do this is so we can have dynamic changelog creation and smart semantic versioning based on commits (with the ability to override).
The following tools are used:
- commitizen
Used for prompting recommended entries within a commit message to ensure it contains the necessary information.- conventional changelog
- Prompts for conventional changelog standard.
- conventional changelog
- husky
By using the hooks from this package we intercept commits being made and verify them with commitlint.- Prevent bad commits/pushes.
- commitlint
- cli
- config-conventional
- rule preset in use
This repository uses a standard version to aid in version control and release management.
When using standard version to cut a release, there is automated changelog modifitions made based on commit messages.
// If you typically use npm version to cut a new release, do this instead:
npm run release