Clonar el repositorio:
$ git clone https://github.com/RoxnnyABarriosC/nodeTsEs6Babel.git
Configura tu usuario y contraseña y presiona enter. Luego entra a la carpeta nodeTsEs6Babel
.
cd nodeTsEs6Babel
require:
- Node.js v16+
- TypeORM v0.3+
- Babel v7+
- TypeScript v4+
- Nodemon v2+
Instala las dependencias y las de desarrollo haciendo:
pnpm i
NOTE: Si no tines intalado pnpm puedes hacerlo ejecutanto
npm i -G pnpm
Luego crea un nuevo archivo .env, copia y pega todas las variables del archivo .env.example y pon los valores correspondientes como sigue:
NODE_ENV=development
URL_API=<protocol>://<domain><port><prefix><version>
URL_WEB=http://localhost:3000
PREFIX=/api
PORT=3000
VERSION=/v1
DB_HOST=localhost
DB_USER=nodetses6babel
DB_DATABASE=nodetses6babel
DB_PASSWORD=nodetses6babel
DB_PORT=5433
DB_SYNCHRONIZE=true
DB_TYPE=postgres
PAGINATION_LIMIT=10
SET_COOKIE_SECURE=true
SET_COOKIE_SAME_SITE=none
JWT_SECRET=nodetses6babel
JWT_EXPIRES=600000
JWT_ISS=nodetses6babel
JWT_AUD=nodetses6babel.com
ENCRYPTION_DEFAULT=bcrypt
LOCALE=es
Debes usar ${pnpm start:dev}
, Por ejemplo.
$ pnpm start:dev
COLECCION EN POSTMAN: aqui