- Auth
- User CRUD
- User roles
- Example CRUD
- Copy .env.template to .env file and:
- Replace user, password, host and port for yours own values. DATABASE_URL="mysql://user:password@host:port/exampleDb"
- Secret word to encrypt passwords. JWT_SECRET=an_aleatory_hash
- Create a space to upload images in Cloudinary
- CLOUDINARY_URL=cloudinary://<your_api_key>:<your_api_secret>@
- CLOUDINARY_FOLDER=
- Set PORT for API
- pnpm i
To instal database run docker command: docker compose up -d
- You need install docker.
Generate Prisma Client npx prisma migrate dev --name init
- Run this API
pnpm start:dev
- localhost:[port]/api/docs
- Start project.
- Call to end-point POST user/firstuser
- IMPORTANT: For safety, delete the related methods from userController and userService when you has been created the first user.
- Now you can access the api with with email: 'admin@correo.com' and password: 'A123456b'.
- TIP: You can edit the values for the first user before run this end-point (into userService.ts file) and use the email and password that you set to login.