Skip to content

Commit

Permalink
Added basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleigh committed Jul 3, 2018
1 parent c430879 commit 7c3aba9
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

/dist
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src
tsconfig.json
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import RabbitMQModule from './rabbit.module';
import RabbitMQService from './rabbitmq.service';

export default RabbitMQModule;
export {
RabbitMQService,
};
12 changes: 12 additions & 0 deletions src/rabbit.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {
Module,
} from '@nestjs/common';
import RabbitMQService from './rabbitmq.service';
import ConfigModule from '@bashleigh/nest-config/dist';

@Module({
imports: [ConfigModule],
providers: [RabbitMQService],
exports: [RabbitMQService],
})
export default class RabbitMQModule {}
15 changes: 15 additions & 0 deletions src/rabbitmq.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {
Injectable,
} from '@nestjs/common';
import {
ConfigService,
} from '@bashleigh/nest-config';
import * as amqp from 'amqplib';

@Injectable()
export default class RabbitMQService
{
connection;
constructor(private readonly config: ConfigService)
{}
}
27 changes: 27 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"noImplicitAny": false,
"noUnusedLocals": false,
"removeComments": false,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": false,
"allowJs": false,
"rootDir": "./src",
"baseUrl": "./",
"outDir": "./dist"
},
"include": [
"*.ts",
"**/*.ts"
],
"exclude": [
"node_modules",
"./**/*.spec.ts",
"examples"
]
}

0 comments on commit 7c3aba9

Please sign in to comment.