Skip to content

Commit

Permalink
chore: Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Sep 29, 2020
1 parent af05538 commit 9779689
Show file tree
Hide file tree
Showing 68 changed files with 9,868 additions and 5,521 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
script: monorepo ci configure && git fetch --quiet && git rebase origin/${TRAVIS_BRANCH} && yarn docs:publish
- stage: deploy-artifacts
name: 'Deploy examples'
if: (NOT type IN (pull_request)) AND (branch = production)
if: (NOT type IN (pull_request)) AND (branch = production || branch = beta)
script: monorepo ci configure && git fetch --quiet && git rebase origin/${TRAVIS_BRANCH} && yarn examples:publish

stages:
Expand Down
11 changes: 6 additions & 5 deletions examples/aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@
"author": "",
"license": "MIT",
"dependencies": {
"@types/swagger-schema-official": "2.0.21",
"@types/aws-serverless-express": "3.3.1",
"@tsed/ajv": "6.0.0-beta.2",
"@tsed/common": "6.0.0-beta.2",
"@tsed/core": "6.0.0-beta.2",
"@tsed/di": "6.0.0-beta.2",
"@tsed/exceptions": "6.0.0-beta.2",
"@tsed/schema": "6.0.0-beta.2",
"@tsed/json-mapper": "6.0.0-beta.2",
"@tsed/swagger": "6.0.0-beta.2",
"@tsed/platform-express": "6.0.0-beta.2",
"@tsed/testing": "5.60.2",
"@types/swagger-schema-official": "2.0.21",
"@types/aws-serverless-express": "3.3.1",
"aws-serverless-express": "3.3.6",
"body-parser": "1.19.0",
"compression": "1.7.4",
Expand All @@ -56,8 +58,7 @@
"cookie-parser": "1.4.5",
"express": "4.17.1",
"method-override": "^3.0.0",
"node-uuid": "^1.4.8",
"ts-json-properties": "2.0.3"
"node-uuid": "^1.4.8"
},
"devDependencies": {
"@types/chai": "4.2.12",
Expand Down
5 changes: 4 additions & 1 deletion examples/getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
"author": "",
"license": "MIT",
"dependencies": {
"@tsed/ajv": "6.0.0-beta.2",
"@tsed/common": "6.0.0-beta.2",
"@tsed/core": "6.0.0-beta.2",
"@tsed/di": "6.0.0-beta.2",
"@tsed/platform-express": "6.0.0-beta.2",
"@tsed/exceptions": "6.0.0-beta.2",
"@tsed/schema": "6.0.0-beta.2",
"@tsed/json-mapper": "6.0.0-beta.2",
"@tsed/platform-express": "6.0.0-beta.2",
"@tsed/swagger": "6.0.0-beta.2",
"@types/swagger-schema-official": "2.0.21",
"body-parser": "1.19.0",
Expand Down
5 changes: 2 additions & 3 deletions examples/getting-started/src/Server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Configuration, GlobalAcceptMimesMiddleware, Inject, PlatformApplication} from "@tsed/common";
import {Configuration, Inject, PlatformApplication} from "@tsed/common";
import "@tsed/platform-express";
import "@tsed/swagger";
import * as bodyParser from "body-parser";
Expand Down Expand Up @@ -39,7 +39,7 @@ const rootDir = __dirname;
token: true
},
statics: {
"/statics": join(__dirname, "..", "statics")
"/": join(__dirname, "..", "statics")
}
})
export class Server {
Expand All @@ -53,7 +53,6 @@ export class Server {
$beforeRoutesInit(): void | Promise<any> {
this.app
.use(cors())
.use(GlobalAcceptMimesMiddleware)
.use(cookieParser())
.use(compress({}))
.use(methodOverride())
Expand Down
5 changes: 4 additions & 1 deletion examples/mongoose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
"author": "",
"license": "MIT",
"dependencies": {
"@tsed/ajv": "6.0.0-beta.2",
"@tsed/common": "6.0.0-beta.2",
"@tsed/core": "6.0.0-beta.2",
"@tsed/di": "6.0.0-beta.2",
"@tsed/platform-express": "6.0.0-beta.2",
"@tsed/exceptions": "6.0.0-beta.2",
"@tsed/schema": "6.0.0-beta.2",
"@tsed/json-mapper": "6.0.0-beta.2",
"@tsed/platform-express": "6.0.0-beta.2",
"@tsed/mongoose": "6.0.0-beta.2",
"@tsed/swagger": "6.0.0-beta.2",
"@tsed/testing-mongoose": "6.0.0-beta.2",
Expand Down
7 changes: 2 additions & 5 deletions examples/mongoose/src/Server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {GlobalAcceptMimesMiddleware} from "@tsed/common";
import {PlatformApplication} from "@tsed/common";
import {Configuration, Inject} from "@tsed/di";
import "@tsed/mongoose";
Expand All @@ -13,7 +12,6 @@ import * as methodOverride from "method-override";
rootDir: __dirname,
acceptMimes: ["application/json"],
port: process.env.PORT || 8000,
httpsPort: false,
passport: {},
mongoose: {
url: process.env.mongoose_url || "mongodb://127.0.0.1:27017/example-mongoose-test",
Expand All @@ -22,9 +20,9 @@ import * as methodOverride from "method-override";
useUnifiedTopology: true
}
},
swagger: {
swagger: [{
path: "/api-docs"
},
}],
debug: false
})
export class Server {
Expand All @@ -33,7 +31,6 @@ export class Server {

$beforeRoutesInit(): void | Promise<any> {
this.app
.use(GlobalAcceptMimesMiddleware)
.use(cookieParser())
.use(compress({}))
.use(methodOverride())
Expand Down
Loading

0 comments on commit 9779689

Please sign in to comment.