Skip to content

Commit

Permalink
chore(example): restructure and update basic example
Browse files Browse the repository at this point in the history
  • Loading branch information
raschan committed Aug 24, 2021
1 parent f388f1d commit e310273
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 34 deletions.
31 changes: 0 additions & 31 deletions example/package.json

This file was deleted.

20 changes: 20 additions & 0 deletions examples/01-Basic_Connection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Example for nest-amqp

This is a example NestJS project that is using nest-amqp.
It is a REST-Interface to interact with an ActiveMQ Broker.

## Step 1: Start docker image to have an AMQP broker

```
docker-compose up
```

## Step 2: Start example

```
npm install
npm run start
```

HTTP server is listing under port `4444`.
You can use the requests in `./http-requests/add-user.http` for testing;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions examples/01-Basic_Connection/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "nest-amqp-example",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"start": "nest start",
"start:dev": "nest start --watch",
"start:prod": "node dist/main"
},
"dependencies": {
"@nestjs/common": "^8.0.6",
"@nestjs/core": "^8.0.6",
"@nestjs/platform-express": "^8.0.6",
"@team-supercharge/nest-amqp": "^2.0.0",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.3.0"
},
"devDependencies": {
"@nestjs/cli": "^8.1.1",
"@nestjs/schematics": "^8.0.2",
"@types/express": "^4.17.13",
"@types/node": "^16.4.13",
"ts-loader": "^9.2.5",
"ts-node": "^10.2.0",
"tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test,example}/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test,examples}/**/*.ts\"",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"sourceMap": true
},
"exclude": ["node_modules", "**/*spec.ts", "example", "src/test", "dist"]
"exclude": ["node_modules", "**/*spec.ts", "examples", "src/test", "dist"]
}
2 changes: 1 addition & 1 deletion tsconfig.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"sourceMap": false
},
"exclude": ["node_modules", "**/*spec.ts", "example", "src/test", "dist"]
"exclude": ["node_modules", "**/*spec.ts", "examples", "src/test", "dist"]
}

0 comments on commit e310273

Please sign in to comment.