You can stores and manage:
- Users
- Sequelize ORM
- TypeScript
- Passport
- Commander
- Express
- Node
** Requires a NPM and NodeJS installed in your local machine
** Also requires any database server installed
- Open your prefered editor
- Clone this repository and cd to forms/backend
- run the npm install
- make a config.json in that folder and reads the README.txt
npm run db help
Display the command line for database actions (restart, admin, add-input, remove-input)
npm run start:dev
Run server and listen for any changes
npm run start:prod
Run server
** Is your responsability set the NODE_ENV in "production", "development" or "test" mode. Thats not handled by the scripts
POST
/login (PUBLIC)
Get the access token
BODY STRUCTURE:
interface UserData{
username: string,
password: string
}
POST
/user (PUBLIC)
Create new user and get the access token
BODY STRUCTURE:
interface UserData{
username: string,
password: string
}
GET
/user
** Requires the Authorization Header
Get info of the user
GET
/user/all
** Requires the Authorization Header
Get all of the users
PUT
/user
** Requires the Authorization Header
Updates the user
BODY STRUCTURE:
interface UserData{
username: string,
password: string
}
DELETE
/user
** Requires the Authorization Header
Deletes the user
@mdjfs @blue01H