mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
doc(samples) update samples
This commit is contained in:
1457
sample/03-microservices/package-lock.json
generated
Normal file
1457
sample/03-microservices/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
sample/05-sql-typeorm/README.md
Normal file
27
sample/05-sql-typeorm/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
### SQL TypeORM sample
|
||||
|
||||
### Installation
|
||||
|
||||
|
||||
`npm install`
|
||||
|
||||
### Running
|
||||
|
||||
This example requires docker or a local MySQL installation. If using a local MySQL database, see `app.module.ts` for credentials, and make sure there are matching credentials in the database and the source code.
|
||||
|
||||
#### Docker
|
||||
|
||||
There is a `docker-compose.yml` file for starting Docker.
|
||||
|
||||
`docker-compose up`
|
||||
|
||||
After running the sample, you can stop the Docker container with
|
||||
|
||||
`docker-compose down`
|
||||
|
||||
### Run the sample
|
||||
|
||||
Then, run Nest as usual:
|
||||
|
||||
`npm run start`
|
||||
|
||||
27
sample/06-mongoose/README.md
Normal file
27
sample/06-mongoose/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
### Mongoose sample
|
||||
|
||||
### Installation
|
||||
|
||||
|
||||
`npm install`
|
||||
|
||||
### Running
|
||||
|
||||
This example requires docker or a local mongodb installation. If using a local mongodb, see `app.module.ts` for connection options, and make sure there are matching options for the mongodb installation and the source code.
|
||||
|
||||
#### Docker
|
||||
|
||||
There is a `docker-compose.yml` file for starting Docker.
|
||||
|
||||
`docker-compose up`
|
||||
|
||||
After running the sample, you can stop the Docker container with
|
||||
|
||||
`docker-compose down`
|
||||
|
||||
### Run the sample
|
||||
|
||||
Then, run Nest as usual:
|
||||
|
||||
`npm run start`
|
||||
|
||||
1536
sample/06-mongoose/package-lock.json
generated
Normal file
1536
sample/06-mongoose/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
sample/07-sequelize/README.md
Normal file
26
sample/07-sequelize/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
### Sequelize sample
|
||||
|
||||
### Installation
|
||||
|
||||
`npm install`
|
||||
|
||||
### Running
|
||||
|
||||
This example requires docker or a local MySQL installation. If using a local MySQL database, see `database/database.providers.ts` for credentials, and make sure there are matching credentials in the database and the source code.
|
||||
|
||||
#### Docker
|
||||
|
||||
There is a `docker-compose.yml` file for starting Docker.
|
||||
|
||||
`docker-compose up`
|
||||
|
||||
After running the sample, you can stop the Docker container with
|
||||
|
||||
`docker-compose down`
|
||||
|
||||
### Run the sample
|
||||
|
||||
Then, run Nest as usual:
|
||||
|
||||
`npm run start`
|
||||
|
||||
1676
sample/07-sequelize/package-lock.json
generated
Normal file
1676
sample/07-sequelize/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
4458
sample/09-babel-example/package-lock.json
generated
Normal file
4458
sample/09-babel-example/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
5
sample/10-fastify/README.md
Normal file
5
sample/10-fastify/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### Fastify sample
|
||||
|
||||
Note that if you are running the Nest app on a remote machine, you may need to change the listen address, as per [these instructions](https://docs.nestjs.com/techniques/performance#adapter):
|
||||
|
||||
`await app.listen(3000, '0.0.0.0')`
|
||||
1216
sample/10-fastify/package-lock.json
generated
Normal file
1216
sample/10-fastify/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
2820
sample/12-graphql-apollo/package-lock.json
generated
Normal file
2820
sample/12-graphql-apollo/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
sample/13-mongo-typeorm/README.md
Normal file
26
sample/13-mongo-typeorm/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
### Mongoose sample
|
||||
|
||||
### Installation
|
||||
|
||||
|
||||
`npm install`
|
||||
|
||||
### Running
|
||||
|
||||
This example requires docker or a local mongodb installation. If using a local mongodb, see `app.module.ts` for connection options, and make sure there are matching options for the mongodb installation and the source code.
|
||||
|
||||
#### Docker
|
||||
|
||||
There is a `docker-compose.yml` file for starting Docker.
|
||||
|
||||
`docker-compose up`
|
||||
|
||||
After running the sample, you can stop the Docker container with
|
||||
|
||||
`docker-compose down`
|
||||
|
||||
### Run the sample
|
||||
|
||||
Then, run Nest as usual:
|
||||
|
||||
`npm run start`
|
||||
1904
sample/13-mongo-typeorm/package-lock.json
generated
Normal file
1904
sample/13-mongo-typeorm/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
1456
sample/16-gateways-ws/package-lock.json
generated
Normal file
1456
sample/16-gateways-ws/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
5
sample/17-mvc-fastify/README.md
Normal file
5
sample/17-mvc-fastify/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### Fastify MVC sample
|
||||
|
||||
Note that if you are running the Nest app on a remote machine, you may need to change the listen address, as per [these instructions](https://docs.nestjs.com/techniques/performance#adapter):
|
||||
|
||||
`await app.listen(3000, '0.0.0.0')`
|
||||
8520
sample/19-auth-jwt/package-lock.json
generated
Normal file
8520
sample/19-auth-jwt/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
6117
sample/20-cache/package-lock.json
generated
Normal file
6117
sample/20-cache/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,13 @@
|
||||
"description": "Nest TypeScript starter repository",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"start": "ts-node src/main",
|
||||
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
||||
"start": "ts-node -r tsconfig-paths/register src/main.ts",
|
||||
"start:dev": "tsc-watch -p tsconfig.build.json --onSuccess \"node dist/main.js\"",
|
||||
"start:debug": "tsc-watch -p tsconfig.build.json --onSuccess \"node --inspect-brk dist/main.js\"",
|
||||
"prestart:prod": "npm run build",
|
||||
"start:prod": "node dist/main.js"
|
||||
"start:prod": "node dist/main.js",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.6.7",
|
||||
@@ -27,6 +30,9 @@
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "24.1.0",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0"
|
||||
"tslint": "5.20.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"tsc-watch": "2.2.1",
|
||||
"tsconfig-paths": "3.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ import { AppController } from './app.controller';
|
||||
imports: [CacheModule.register()],
|
||||
controllers: [AppController],
|
||||
})
|
||||
export class ApplicationModule {}
|
||||
export class AppModule {}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { ApplicationModule } from './app.module';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(ApplicationModule);
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.useGlobalPipes(new ValidationPipe());
|
||||
await app.listen(3000);
|
||||
}
|
||||
|
||||
6059
sample/21-serializer/package-lock.json
generated
Normal file
6059
sample/21-serializer/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
5646
sample/22-graphql-prisma/package-lock.json
generated
Normal file
5646
sample/22-graphql-prisma/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user