https://github.com/sanogotech/nestjsstarter
nestJS Starter
https://github.com/sanogotech/nestjsstarter
javascript jwt nestjs nodejs rest rest-api scafolding swagger typescript
Last synced: 2 months ago
JSON representation
nestJS Starter
- Host: GitHub
- URL: https://github.com/sanogotech/nestjsstarter
- Owner: sanogotech
- Created: 2022-08-13T15:54:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-07T16:44:42.000Z (over 2 years ago)
- Last Synced: 2025-02-09T00:17:02.055Z (4 months ago)
- Topics: javascript, jwt, nestjs, nodejs, rest, rest-api, scafolding, swagger, typescript
- Language: TypeScript
- Homepage:
- Size: 25.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nestjsStarter
nestJS Starter.**NestJs** reduces a lot of the time wasted tinkering on directories structure, setting up tests, routes, database connections and so on, everything is solved for the average use case.
**The Nest CLI** is a command-line interface tool that helps you to initialize, develop, and maintain your Nest applications. It assists in multiple ways, including scaffolding the project, serving it in development mode, and building and bundling the application for production distribution. It embodies best-practice architectural patterns to encourage well-structured apps.
** NestJs RedHat Sponsor
## Docs
- https://medium.com/@codeeverywhere/nestjs-and-its-advantages-for-backend-developers-43c2da5ff05e
- https://www.sitepoint.com/typescript-vs-javascript/
- https://itnext.io/crud-api-in-3-lines-using-nestjs-692df3d61160
- https://docs.nestjs.com/cli/overview
- https://www.sidechannel.blog/en/creating-an-api-with-nestjs/
- https://blog.devsharma.live/nest-js-rest-api-tutorial
- https://arctype.com/blog/sqlite-nestjs-tutorial/
- https://betterprogramming.pub/nestjs-challenge-take-the-basic-steps-and-start-developing-a-rest-api-5401b234d834
- https://www.prisma.io/blog/nestjs-prisma-rest-api-7D056s1BmOL0
- https://progressivecoder.com/build-a-nestjs-prisma-rest-api/## Install Nodejs and NestJS
```
* https://nodejs.org/en/download/
$ node -v
$ npm -v
$ npm install typescript --save-dev
$ npx tsc file.ts orr tsc file.ts$ npm install -g @nestjs/cli
$ nest --help
$ nest generate --help
```
## TOP nest commands
* nest new project
* nest generate resource or module or controller or service
* nest add lib
* nest info
## CRUD API in 3 lines using NestJS
* Create project
```
nest new myproject
cd myproject
npm run start:dev
run: localhost:3000
``````
*CRUD Generator all with
``````|
* https://docs.nestjs.com/recipes/crud-generator
nest generate resource tutorial
```
$ npm install --save @nestjs/swagger swagger-ui-express
```nest g module tutorial
nest g controller tutorial
nest g service tutorial
```
## Swagger- https://progressivecoder.com/a-guide-to-nestjs-swagger-configuration/
```
```
## NestJs StandardMode(tsc) vs MonoMod(webpack)
## Install Dependencies
```
Passport
Passport-local
Jwt
Passport-jwt
SQLIte3
TypeORM
Bcrypt```
```
$ npm install --save @nestjs/passport passport passport-local @nestjs/jwt passport-jwt @nestjs/typeorm typeorm sqlite3 bcrypt-- dev dependencies --
$ npm install --save-dev @types/passport-local @types/passport-jwt @types/bcrypt```
-- Dotenv (.env) at the root of the project ---
```
npm install --save @nestjs/config
```
*.env
```
SERVER_PORT=3000
MODE=DEV
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=
DB_DATABASE=shopping_list
DB_SYNCHRONIZE=true
```
## Prisma CLI: Database Modeling and Crud Generator```
<<<<<<< HEAD
$ npm install prisma --save-dev
=======
npm install prisma --save-dev
npx prisma init
```## Prisma Client
```
>>>>>>> d704ab5706029869e7f868bfbc04bc58c93708e8
$ npm install @prisma/client1. npx prisma init
2. npx prisma migrate dev --name init
```