Showing
16 changed files
with
306 additions
and
0 deletions
src/wico-server/.gitignore
0 → 100644
| 1 | +# compiled output | ||
| 2 | +/dist | ||
| 3 | +/node_modules | ||
| 4 | + | ||
| 5 | +# Logs | ||
| 6 | +logs | ||
| 7 | +*.log | ||
| 8 | +npm-debug.log* | ||
| 9 | +yarn-debug.log* | ||
| 10 | +yarn-error.log* | ||
| 11 | +lerna-debug.log* | ||
| 12 | + | ||
| 13 | +# OS | ||
| 14 | +.DS_Store | ||
| 15 | + | ||
| 16 | +# Tests | ||
| 17 | +/coverage | ||
| 18 | +/.nyc_output | ||
| 19 | + | ||
| 20 | +# IDEs and editors | ||
| 21 | +/.idea | ||
| 22 | +.project | ||
| 23 | +.classpath | ||
| 24 | +.c9/ | ||
| 25 | +*.launch | ||
| 26 | +.settings/ | ||
| 27 | +*.sublime-workspace | ||
| 28 | + | ||
| 29 | +# IDE - VSCode | ||
| 30 | +.vscode/* | ||
| 31 | +!.vscode/settings.json | ||
| 32 | +!.vscode/tasks.json | ||
| 33 | +!.vscode/launch.json | ||
| 34 | +!.vscode/extensions.json | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/wico-server/.prettierrc
0 → 100644
src/wico-server/README.md
0 → 100644
| 1 | +<p align="center"> | ||
| 2 | + <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a> | ||
| 3 | +</p> | ||
| 4 | + | ||
| 5 | +[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master | ||
| 6 | +[travis-url]: https://travis-ci.org/nestjs/nest | ||
| 7 | +[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux | ||
| 8 | +[linux-url]: https://travis-ci.org/nestjs/nest | ||
| 9 | + | ||
| 10 | + <p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p> | ||
| 11 | + <p align="center"> | ||
| 12 | +<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> | ||
| 13 | +<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> | ||
| 14 | +<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a> | ||
| 15 | +<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a> | ||
| 16 | +<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a> | ||
| 17 | +<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a> | ||
| 18 | +<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a> | ||
| 19 | +<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> | ||
| 20 | +<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> | ||
| 21 | + <a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a> | ||
| 22 | + <a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> | ||
| 23 | +</p> | ||
| 24 | + <!--[](https://opencollective.com/nest#backer) | ||
| 25 | + [](https://opencollective.com/nest#sponsor)--> | ||
| 26 | + | ||
| 27 | +## Description | ||
| 28 | + | ||
| 29 | +[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
| 30 | + | ||
| 31 | +## Installation | ||
| 32 | + | ||
| 33 | +```bash | ||
| 34 | +$ npm install | ||
| 35 | +``` | ||
| 36 | + | ||
| 37 | +## Running the app | ||
| 38 | + | ||
| 39 | +```bash | ||
| 40 | +# development | ||
| 41 | +$ npm run start | ||
| 42 | + | ||
| 43 | +# watch mode | ||
| 44 | +$ npm run start:dev | ||
| 45 | + | ||
| 46 | +# production mode | ||
| 47 | +$ npm run start:prod | ||
| 48 | +``` | ||
| 49 | + | ||
| 50 | +## Test | ||
| 51 | + | ||
| 52 | +```bash | ||
| 53 | +# unit tests | ||
| 54 | +$ npm run test | ||
| 55 | + | ||
| 56 | +# e2e tests | ||
| 57 | +$ npm run test:e2e | ||
| 58 | + | ||
| 59 | +# test coverage | ||
| 60 | +$ npm run test:cov | ||
| 61 | +``` | ||
| 62 | + | ||
| 63 | +## Support | ||
| 64 | + | ||
| 65 | +Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | ||
| 66 | + | ||
| 67 | +## Stay in touch | ||
| 68 | + | ||
| 69 | +- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | ||
| 70 | +- Website - [https://nestjs.com](https://nestjs.com/) | ||
| 71 | +- Twitter - [@nestframework](https://twitter.com/nestframework) | ||
| 72 | + | ||
| 73 | +## License | ||
| 74 | + | ||
| 75 | + Nest is [MIT licensed](LICENSE). |
src/wico-server/nest-cli.json
0 → 100644
src/wico-server/package-lock.json
0 → 100644
This diff could not be displayed because it is too large.
src/wico-server/package.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "wico-server", | ||
| 3 | + "version": "0.0.1", | ||
| 4 | + "description": "", | ||
| 5 | + "author": "", | ||
| 6 | + "license": "MIT", | ||
| 7 | + "scripts": { | ||
| 8 | + "build": "rimraf dist && tsc -p tsconfig.build.json", | ||
| 9 | + "format": "prettier --write \"src/**/*.ts\"", | ||
| 10 | + "start": "ts-node -r tsconfig-paths/register src/main.ts", | ||
| 11 | + "start:dev": "tsc-watch -p tsconfig.build.json --onSuccess \"node dist/main.js\"", | ||
| 12 | + "start:debug": "tsc-watch -p tsconfig.build.json --onSuccess \"node --inspect-brk dist/main.js\"", | ||
| 13 | + "start:prod": "node dist/main.js", | ||
| 14 | + "lint": "tslint -p tsconfig.json -c tslint.json", | ||
| 15 | + "test": "jest", | ||
| 16 | + "test:watch": "jest --watch", | ||
| 17 | + "test:cov": "jest --coverage", | ||
| 18 | + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
| 19 | + "test:e2e": "jest --config ./test/jest-e2e.json" | ||
| 20 | + }, | ||
| 21 | + "dependencies": { | ||
| 22 | + "@nestjs/common": "^6.0.0", | ||
| 23 | + "@nestjs/core": "^6.0.0", | ||
| 24 | + "@nestjs/platform-express": "^6.0.0", | ||
| 25 | + "reflect-metadata": "^0.1.12", | ||
| 26 | + "rimraf": "^2.6.2", | ||
| 27 | + "rxjs": "^6.3.3" | ||
| 28 | + }, | ||
| 29 | + "devDependencies": { | ||
| 30 | + "@nestjs/testing": "^6.0.0", | ||
| 31 | + "@types/express": "4.16.1", | ||
| 32 | + "@types/jest": "24.0.11", | ||
| 33 | + "@types/node": "11.13.4", | ||
| 34 | + "@types/supertest": "2.0.7", | ||
| 35 | + "jest": "24.7.1", | ||
| 36 | + "prettier": "1.17.0", | ||
| 37 | + "supertest": "4.0.2", | ||
| 38 | + "ts-jest": "24.0.2", | ||
| 39 | + "ts-node": "8.1.0", | ||
| 40 | + "tsc-watch": "2.2.1", | ||
| 41 | + "tsconfig-paths": "3.8.0", | ||
| 42 | + "tslint": "5.16.0", | ||
| 43 | + "typescript": "3.4.3" | ||
| 44 | + }, | ||
| 45 | + "jest": { | ||
| 46 | + "moduleFileExtensions": [ | ||
| 47 | + "js", | ||
| 48 | + "json", | ||
| 49 | + "ts" | ||
| 50 | + ], | ||
| 51 | + "rootDir": "src", | ||
| 52 | + "testRegex": ".spec.ts$", | ||
| 53 | + "transform": { | ||
| 54 | + "^.+\\.(t|j)s$": "ts-jest" | ||
| 55 | + }, | ||
| 56 | + "coverageDirectory": "../coverage", | ||
| 57 | + "testEnvironment": "node" | ||
| 58 | + } | ||
| 59 | +} |
src/wico-server/src/app.controller.spec.ts
0 → 100644
| 1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
| 2 | +import { AppController } from './app.controller'; | ||
| 3 | +import { AppService } from './app.service'; | ||
| 4 | + | ||
| 5 | +describe('AppController', () => { | ||
| 6 | + let appController: AppController; | ||
| 7 | + | ||
| 8 | + beforeEach(async () => { | ||
| 9 | + const app: TestingModule = await Test.createTestingModule({ | ||
| 10 | + controllers: [AppController], | ||
| 11 | + providers: [AppService], | ||
| 12 | + }).compile(); | ||
| 13 | + | ||
| 14 | + appController = app.get<AppController>(AppController); | ||
| 15 | + }); | ||
| 16 | + | ||
| 17 | + describe('root', () => { | ||
| 18 | + it('should return "Hello World!"', () => { | ||
| 19 | + expect(appController.getHello()).toBe('Hello World!'); | ||
| 20 | + }); | ||
| 21 | + }); | ||
| 22 | +}); |
src/wico-server/src/app.controller.ts
0 → 100644
| 1 | +import { Controller, Get } from '@nestjs/common'; | ||
| 2 | +import { AppService } from './app.service'; | ||
| 3 | + | ||
| 4 | +@Controller() | ||
| 5 | +export class AppController { | ||
| 6 | + constructor(private readonly appService: AppService) {} | ||
| 7 | + | ||
| 8 | + @Get() | ||
| 9 | + getHello(): string { | ||
| 10 | + return this.appService.getHello(); | ||
| 11 | + } | ||
| 12 | +} |
src/wico-server/src/app.module.ts
0 → 100644
src/wico-server/src/app.service.ts
0 → 100644
src/wico-server/src/main.ts
0 → 100644
src/wico-server/test/app.e2e-spec.ts
0 → 100644
| 1 | +import { Test, TestingModule } from '@nestjs/testing'; | ||
| 2 | +import * as request from 'supertest'; | ||
| 3 | +import { AppModule } from './../src/app.module'; | ||
| 4 | + | ||
| 5 | +describe('AppController (e2e)', () => { | ||
| 6 | + let app; | ||
| 7 | + | ||
| 8 | + beforeEach(async () => { | ||
| 9 | + const moduleFixture: TestingModule = await Test.createTestingModule({ | ||
| 10 | + imports: [AppModule], | ||
| 11 | + }).compile(); | ||
| 12 | + | ||
| 13 | + app = moduleFixture.createNestApplication(); | ||
| 14 | + await app.init(); | ||
| 15 | + }); | ||
| 16 | + | ||
| 17 | + it('/ (GET)', () => { | ||
| 18 | + return request(app.getHttpServer()) | ||
| 19 | + .get('/') | ||
| 20 | + .expect(200) | ||
| 21 | + .expect('Hello World!'); | ||
| 22 | + }); | ||
| 23 | +}); |
src/wico-server/test/jest-e2e.json
0 → 100644
src/wico-server/tsconfig.build.json
0 → 100644
src/wico-server/tsconfig.json
0 → 100644
| 1 | +{ | ||
| 2 | + "compilerOptions": { | ||
| 3 | + "module": "commonjs", | ||
| 4 | + "declaration": true, | ||
| 5 | + "removeComments": true, | ||
| 6 | + "emitDecoratorMetadata": true, | ||
| 7 | + "experimentalDecorators": true, | ||
| 8 | + "target": "es2017", | ||
| 9 | + "sourceMap": true, | ||
| 10 | + "outDir": "./dist", | ||
| 11 | + "baseUrl": "./", | ||
| 12 | + "incremental": true | ||
| 13 | + }, | ||
| 14 | + "exclude": ["node_modules", "dist"] | ||
| 15 | +} |
src/wico-server/tslint.json
0 → 100644
| 1 | +{ | ||
| 2 | + "defaultSeverity": "error", | ||
| 3 | + "extends": ["tslint:recommended"], | ||
| 4 | + "jsRules": { | ||
| 5 | + "no-unused-expression": true | ||
| 6 | + }, | ||
| 7 | + "rules": { | ||
| 8 | + "quotemark": [true, "single"], | ||
| 9 | + "member-access": [false], | ||
| 10 | + "ordered-imports": [false], | ||
| 11 | + "max-line-length": [true, 150], | ||
| 12 | + "member-ordering": [false], | ||
| 13 | + "interface-name": [false], | ||
| 14 | + "arrow-parens": false, | ||
| 15 | + "object-literal-sort-keys": false | ||
| 16 | + }, | ||
| 17 | + "rulesDirectory": [] | ||
| 18 | +} |
-
Please register or login to post a comment