https://github.com/lemoncode/gex-backend-node
https://github.com/lemoncode/gex-backend-node
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lemoncode/gex-backend-node
- Owner: Lemoncode
- License: mit
- Created: 2024-11-06T16:18:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-20T08:55:23.000Z (about 1 year ago)
- Last Synced: 2025-06-17T22:11:31.118Z (about 1 year ago)
- Language: TypeScript
- Size: 146 KB
- Stars: 1
- Watchers: 6
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gex-backend-node
> > Note: We must be installed almost Node.js 22.11.0 or higher.
> >
> > [Install Node.js](https://nodejs.org/)
> >
> > we can also use [nvm for windows](https://github.com/coreybutler/nvm-windows/releases) to manage the Node.js versions
> > or for linux/macOS we can use [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating)
## Steps to run the project
### Installation
```bash
npm install
```
### Run the project
Now you can run the project.
```bash
npm start
```
It's important start the project before running the console runners because we will create .env file, if we don't have it yet,
and then the next step will be create the seed data in the database.
### Create seed data in the database
You can run the console runners to create seed data in the database.
```bash
npm run start:console-runners
```
Now, you can select the option to install seed data.
```bash
❯ seed-data
exit
```
After select the option `seed-data` and you will insert the seed data in the database.
### Endpoints now available
#### Login:
- [POST] http://localhost:3000/api/login
Rol usuario-administrador:
```json
{
"email": "carlos.gonzalez@example.com",
"password": "carlos123"
}
```
Rol Usuario-Escritura:
```json
{
"email": "maria.martinez@example.com",
"password": "maria456"
}
```
Rol Usuario-Lectura:
```json
{
"email": "juan.rodriguez@example.com",
"password": "temp480"
}
#### Get users:
- [GET] http://localhost:3000/api/users
- [GET] http://localhost:3000/api/users?page=1&pageSize=10
```
```
```