: 'ts-jest'\n },\n globalTeardown: '.\u002Fscripts\u002Fjest\u002Fteardown.js'\n}\n","directory_shortid":null,"id":"b3557b32-3b58-4ead-b221-006063e2bb64","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"HJigzXOJeYD","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"jest.config.js","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"version: '3.3'\nservices:\n mongo:\n image: mongo:4.1\n restart: always\n volumes:\n - mdb-data:\u002Fdata\u002Fdb\n ports:\n - \"27017:27017\"\n environment:\n MONGO_INITDB_ROOT_USERNAME:\n MONGO_INITDB_ROOT_PASSWORD:\n server:\n build:\n context: .\n dockerfile: .\u002FDockerfile\n args:\n - http_proxy\n - https_proxy\n - no_proxy\n image: tsed\u002Fserver:latest\n # The app will restart until Mongo is listening\n restart: always\n depends_on:\n - mongo\n ports:\n - \"8081:8081\"\n environment:\n mongoose_url: mongodb:\u002F\u002Fmongo:27017\u002Ftsed-mongoose\n stdin_open: true # -i\n tty: true # -t\nvolumes:\n mdb-data:\n\n","directory_shortid":null,"id":"90708fc4-71c2-4d5a-9df8-78e935f68fdb","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"BkclG7OJetv","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"docker-compose.yml","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"###############################################################################\n###############################################################################\n## _______ _____ ______ _____ ##\n## |__ __\u002F ____| ____| __ \\ ##\n## | | | (___ | |__ | | | | ##\n## | | \\___ \\| __| | | | | ##\n## | | ____) | |____| |__| | ##\n## |_| |_____\u002F|______|_____\u002F ##\n## ##\n## description : Dockerfile for TsED Application ##\n## author : TsED team ##\n## date : 20190820 ##\n## version : 1.0 ##\n###############################################################################\n###############################################################################\nFROM node:12.13.0-alpine\n\nRUN apk update && apk add build-base git python\n\nCOPY package.json .\nCOPY yarn.lock .\n\nRUN yarn install --production\n\nCOPY .\u002Fresources .\u002Fresources\nCOPY .\u002Fsrc .\u002Fsrc\nCOPY .\u002Fdist .\u002Fdist\n\nEXPOSE 8081\nENV PORT 8081\nENV NODE_ENV production\n\nCMD [\"yarn\", \"start:prod\"]\n","directory_shortid":null,"id":"ed31ef28-822b-4172-95d8-e09b1a2614e8","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"SkYxGmOyxFP","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"Dockerfile","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"language: node_js\n\ncache:\n yarn: true\n\nnode_js:\n - '12.13.0'\n\njobs:\n include:\n - stage: test\n name: Unit tests\n script: yarn test\n - stage: build\n name: Build\n script: yarn docker:build\n - stage: deploy\n name: Deploy\n script: yarn docker:build && yarn deploy\n\nstages:\n - test\n - name: build\n if: branch != master\n - name: deploy\n if: branch = master\n","directory_shortid":null,"id":"ddb757c2-c52b-4f0c-b9df-93c8ac5dce6f","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"rydxfmd1xYD","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":".travis.yml","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"{\n \"include\": [\n \"src\u002F**\u002F*.ts\"\n ],\n \"exclude\": [\n \"**\u002F*.d.ts\",\n \"node_modules\",\n \"**\u002Findex.ts\",\n \"**\u002Finterfaces\u002F**\",\n \"**\u002F*.spec.ts\",\n \"src\u002Ftest\u002Ftools.js\"\n ],\n \"reporter\": [\n \"text-summary\",\n \"html\",\n \"lcov\"\n ],\n \"extension\": [\n \".ts\"\n ],\n \"check-coverage\": true,\n \"lines\": 80,\n \"statements\": 80.13,\n \"functions\": 54.55,\n \"branches\": 72.38,\n \"all\": true\n}\n","directory_shortid":null,"id":"df6eb2b1-524f-48e1-82fd-07385a1fbe78","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"H1vxzX_JxYv","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":".nycrc","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"### Node template\n.DS_Store\n# Logs\nlogs\n*.log\nnpm-debug.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n\n# Directory for instrumented libs generated by jscoverage\u002FJSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# Grunt intermediate storage (http:\u002F\u002Fgruntjs.com\u002Fcreating-plugins#storing-task-files)\n.grunt\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (http:\u002F\u002Fnodejs.org\u002Fapi\u002Faddons.html)\nbuild\u002FRelease\n\n# Dependency directory\n# https:\u002F\u002Fdocs.npmjs.com\u002Fmisc\u002Ffaq#should-i-check-my-node-modules-folder-into-git\nnode_modules\n.npmrc\n*.log\n\n# Typings\ntypings\u002F\n\n# Typescript\nsrc\u002F**\u002F*.js\nsrc\u002F**\u002F*.js.map\ntest\u002F**\u002F*.js\ntest\u002F**\u002F*.js.map\n\n# Test\n\u002F.tmp\n\u002F.nyc_output\n\n# IDE\n.vscode\n.idea\n\n# Project\n\u002Fpublic\n\u002Fdist\n","directory_shortid":null,"id":"5dcf9e85-82ce-4916-99e9-5eb4220e7dd9","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"SkLeMQOJeYv","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":".gitignore","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"{\n \"parser\": \"@typescript-eslint\u002Fparser\",\n \"extends\": [\n \"plugin:@typescript-eslint\u002Frecommended\",\n \"prettier\u002F@typescript-eslint\",\n \"plugin:prettier\u002Frecommended\"\n ],\n \"parserOptions\": {\n \"ecmaVersion\": 2018,\n \"sourceType\": \"module\",\n \"project\": \".\u002Ftsconfig.json\"\n },\n \"env\": {\n \"node\": true,\n \"es6\": true\n },\n \"rules\": {\n \"@typescript-eslint\u002Fno-unused-vars\": 2,\n \"@typescript-eslint\u002Fno-var-requires\": 0\n }\n}\n","directory_shortid":null,"id":"f3a557dd-1b55-4b92-b478-71460ec79fe8","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"BkrlfQuJxYD","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":".eslintrc","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"node_modules\n","directory_shortid":null,"id":"7c243565-a248-4ffe-8fd5-e1ea73c80c95","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"Sy4lzXukeFD","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":".dockerignore","updated_at":"2020-11-04T08:36:42","upload_id":null},{"code":"import { Constant, Controller, Get, HeaderParams, View } from \"@tsed\u002Fcommon\";\nimport { Hidden, SwaggerSettings } from \"@tsed\u002Fswagger\";\nimport { Returns } from \"@tsed\u002Fschema\";\n\n@Hidden()\n@Controller(\"\u002F\")\nexport class IndexCtrl {\n @Constant(\"swagger\")\n swagger: SwaggerSettings[];\n\n @Get(\"\u002F\")\n @View(\"index.ejs\")\n @(Returns(200, String).ContentType(\"text\u002Fhtml\"))\n get(\n @HeaderParams(\"x-forwarded-proto\") protocol: string,\n @HeaderParams(\"host\") host: string\n ) {\n const hostUrl = `${protocol || \"http\"}:\u002F\u002F${host}`;\n\n return {\n BASE_URL: hostUrl,\n docs: this.swagger.map((conf) =\u003E {\n return {\n url: hostUrl + conf.path,\n ...conf\n };\n })\n };\n }\n}\n","directory_shortid":"76vAA","id":"6a2d05e9-abb6-4d8a-ac88-68f7e95f11b7","inserted_at":"2020-11-04T08:58:58","is_binary":false,"sha":null,"shortid":"4Y8q6","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"IndexCtrl.ts","updated_at":"2020-11-04T09:17:10","upload_id":null},{"code":"{\n \"name\": \"mongoose\",\n \"version\": \"1.0.0\",\n \"description\": \"Here an example project with Mongoose and Ts.ED framework.\",\n \"scripts\": {\n \"clean\": \"rimraf '{src,test}\u002F**\u002F*.{js,js.map}'\",\n \"build\": \"yarn tsc\",\n \"test\": \"yarn test:coverage\",\n \"test:unit\": \"cross-env NODE_ENV=test jest\",\n \"test:coverage\": \"yarn test:unit\",\n \"travis:deploy-once\": \"travis-deploy-once\",\n \"travis:coveralls\": \"nyc report --reporter=text-lcov | coveralls\",\n \"tsc\": \"tsc --project tsconfig.compile.json\",\n \"tsc:w\": \"tsc --project tsconfig.json -w\",\n \"start\": \"nodemon --watch \\\"src\u002F**\u002F*.ts\\\" --ignore \\\"node_modules\u002F**\u002F*\\\" --exec ts-node src\u002Findex.ts\",\n \"start:prod\": \"cross-env NODE_ENV=production node dist\u002Findex.js\",\n \"docker:build\": \"yarn build && docker-compose build\",\n \"deploy\": \"exit 0\"\n },\n \"author\": \"\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@tsed\u002Fajv\": \"6.10.0\",\n \"@tsed\u002Fcommon\": \"6.10.0\",\n \"@tsed\u002Fcore\": \"6.10.0\",\n \"@tsed\u002Fdi\": \"6.10.0\",\n \"@tsed\u002Fexceptions\": \"6.10.0\",\n \"@tsed\u002Fjson-mapper\": \"6.10.0\",\n \"@tsed\u002Fmongoose\": \"6.10.0\",\n \"@tsed\u002Fplatform-express\": \"6.10.0\",\n \"@tsed\u002Fschema\": \"6.10.0\",\n \"@tsed\u002Fswagger\": \"6.10.0\",\n \"@tsed\u002Ftesting-mongoose\": \"6.10.0\",\n \"ajv\": \"6.12.6\",\n \"body-parser\": \"1.19.0\",\n \"compression\": \"1.7.4\",\n \"cookie-parser\": \"1.4.5\",\n \"cors\": \"2.8.5\",\n \"cross-env\": \"7.0.2\",\n \"express\": \"4.17.1\",\n \"express-session\": \"1.17.1\",\n \"method-override\": \"3.0.0\",\n \"mongoose\": \"5.10.11\",\n \"serve-static\": \"^1.13.1\"\n },\n \"devDependencies\": {\n \"@tsed\u002Fcli-plugin-jest\": \"2.1.2\",\n \"@tsed\u002Fcli-plugin-mongoose\": \"2.1.2\",\n \"@tsed\u002Ftesting-mongoose\": \"6.10.0\",\n \"@types\u002Fcompression\": \"1.7.0\",\n \"@types\u002Fcookie-parser\": \"1.4.2\",\n \"@types\u002Fcors\": \"2.8.8\",\n \"@types\u002Fexpress\": \"4.17.8\",\n \"@types\u002Fhttp-proxy\": \"^1.17.1\",\n \"@types\u002Fjest\": \"26.0.15\",\n \"@types\u002Fmethod-override\": \"0.0.31\",\n \"@types\u002Fmongoose\": \"5.7.37\",\n \"@types\u002Fnode\": \"14.14.6\",\n \"@types\u002Frequest-promise\": \"^4.1.42\",\n \"@types\u002Fsupertest\": \"2.0.10\",\n \"@typescript-eslint\u002Feslint-plugin\": \"4.6.1\",\n \"@typescript-eslint\u002Fparser\": \"4.6.1\",\n \"concurrently\": \"5.3.0\",\n \"jest\": \"26.6.3\",\n \"nodemon\": \"2.0.6\",\n \"rimraf\": \"^3.0.0\",\n \"supertest\": \"6.0.0\",\n \"ts-jest\": \"26.4.3\",\n \"ts-node\": \"9.0.0\",\n \"typescript\": \"4.0.5\"\n }\n}\n","directory_shortid":null,"id":"d3bcd91b-fd81-4f68-b692-0bcd1db2f610","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"HJneGQdJlYP","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"package.json","updated_at":"2020-11-18T07:48:58","upload_id":null},{"code":"import { Configuration, Inject } from \"@tsed\u002Fdi\";\nimport { PlatformApplication } from \"@tsed\u002Fcommon\";\nimport \"@tsed\u002Fplatform-express\"; \u002F\u002F \u002F!\\ keep this import\nimport * as bodyParser from \"body-parser\";\nimport * as compress from \"compression\";\nimport * as cookieParser from \"cookie-parser\";\nimport * as methodOverride from \"method-override\";\nimport \"@tsed\u002Fajv\";\nimport \"@tsed\u002Fswagger\";\nimport \"@tsed\u002Fmongoose\";\nimport mongooseConfig from \".\u002Fconfig\u002Fmongoose\";\nimport { CalendarsCtrl } from \".\u002Fcontrollers\u002Frest\u002Fcalendars\u002FCalendarsCtrl\";\nimport { IndexCtrl } from \".\u002Fcontrollers\u002Fpages\u002FIndexCtrl\";\n\nexport const rootDir = __dirname;\n\n@Configuration({\n rootDir,\n acceptMimes: [\"application\u002Fjson\"],\n httpPort: process.env.PORT || 8083,\n httpsPort: false, \u002F\u002F CHANGE\n mongoose: mongooseConfig,\n mount: {\n \"\u002Frest\": [CalendarsCtrl],\n \"\u002F\": [IndexCtrl]\n },\n componentsScan: [],\n swagger: [\n {\n path: \"\u002Fv2\u002Fdocs\",\n specVersion: \"2.0\"\n },\n {\n path: \"\u002Fv3\u002Fdocs\",\n specVersion: \"3.0.1\"\n }\n ],\n views: {\n root: `${rootDir}\u002F..\u002Fviews`,\n viewEngine: \"ejs\"\n },\n exclude: [\"**\u002F*.spec.ts\"]\n})\nexport class Server {\n @Inject()\n app: PlatformApplication;\n\n @Configuration()\n settings: Configuration;\n\n $beforeRoutesInit(): void {\n this.app\n .use(cookieParser())\n .use(compress({}))\n .use(methodOverride())\n .use(bodyParser.json())\n .use(\n bodyParser.urlencoded({\n extended: true\n })\n );\n }\n}\n","directory_shortid":"r1UGm_yeFw","id":"00b84392-80b7-4337-a5f9-6838e1b2a266","inserted_at":"2020-11-04T08:36:42","is_binary":false,"sha":null,"shortid":"SyzWfXOJxtP","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"Server.ts","updated_at":"2020-11-04T20:06:06","upload_id":null},{"code":"\u003C!DOCTYPE html\u003E\n\u003Chtml lang=\"en\"\u003E\n\u003Chead\u003E\n \u003Cmeta charset=\"utf-8\"\u003E\n \u003Cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003E\n \u003Cmeta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\"\u003E\n \u003Clink rel=\"icon\" href=\"\u003C%= BASE_URL %\u003Efavicon.ico\"\u003E\n \u003Ctitle\u003Eclient\u003C\u002Ftitle\u003E\n \u003Clink href=\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss?family=Source+Sans+Pro:300,400,600,700\" rel=\"stylesheet\" \u002F\u003E\n \u003Cstyle\u003E\n body, h1 {\n font-family: Source Sans Pro,sans-serif;\n }\n body:after {\n content: \"\";\n background-image: radial-gradient(#eef2f5 0,#f4f7f8 40%,transparent 75%);\n position: absolute;\n top: 0;\n right: 0;\n width: 60%;\n height: 100%;\n z-index: 1;\n }\n .container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .container-logo {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 60px;\n }\n .container-logo img {\n max-width: 150px;\n border-radius: 50%;\n }\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 40px;\n }\n ul li a {\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: .25rem;\n padding-bottom: .25rem;\n margin-left: 10px;\n margin-right: 10px;\n border: 2px solid #504747;\n min-width: 110px;\n border-radius: 10px;\n text-align: center;\n display: block;\n border-radius: 1rem;\n color: #504747;\n text-decoration: none;\n transition: all ease-in-out 0.5s;\n }\n ul li a:hover {\n color: #14a5c2;\n border-color: #14a5c2;\n }\n ul li a span {\n margin: .25rem;\n display: block;\n }\n \u003C\u002Fstyle\u003E\n\u003C\u002Fhead\u003E\n\u003Cbody\u003E\n\u003Cdiv class=\"container\"\u003E\n \u003Cdiv\u003E\n \u003Cdiv class=\"container-logo\"\u003E\n \u003Cimg src=\"https:\u002F\u002Ftsed.io\u002Ftsed-og.png\" alt=\"Ts.ED\"\u003E \n \u003C\u002Fdiv\u003E \n\n \u003Cul\u003E\n \u003C% docs.forEach((doc) =\u003E { %\u003E\n\n \u003Cli\u003E\u003Ca href=\"\u003C%= doc.path %\u003E\"\u003E\u003Cspan\u003EOpenSpec \u003C%= doc.specVersion %\u003E\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003C\u002Fli\u003E\n\n \u003C% }) %\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003C!-- built files will be auto injected --\u003E\n\u003C\u002Fbody\u003E\n\u003C\u002Fhtml\u003E\n","directory_shortid":"YNLln","id":"26b8bf4c-7415-41e9-9ad7-339389f2eb34","inserted_at":"2020-11-04T09:01:01","is_binary":false,"sha":null,"shortid":"QKpml","source_id":"c6702937-e29a-4b7e-9328-057172439c4b","title":"index.ejs","updated_at":"2020-11-04T20:40:17","upload_id":null}],"is_frozen":false,"custom_template":null,"external_resources":[],"template":"node","is_sse":true,"picks":[],"source_id":"c6702937-e29a-4b7e-9328-057172439c4b","forked_template_sandbox":{"alias":"mongoose-xlgty","custom_template":{"color":"#61DAFB","icon_url":"github","id":"38c233cd-c676-4bd7-a376-fb3f2891951d","official":false,"published":true,"title":"mongoose","url":null},"git":{"branch":"master","commit_sha":"54f8f06997f1ab9a2048e493345c1ac9f3c8e4b9","path":"","repo":"tsed-example-mongoose","username":"TypedProject"},"id":"xlgty","inserted_at":"2020-11-04T06:23:59","privacy":0,"template":"node","title":"mongoose","updated_at":"2020-11-05T12:06:50"},"author":{"avatar_url":"https:\u002F\u002Favatars3.githubusercontent.com\u002Fu\u002F1763311?v=4","id":"bd762997-cdd7-4055-a14d-382d70b8ec30","name":"Romain Lenzotti","personal_workspace_id":"24a3d393-76ee-4e45-87a7-9058b2fe6eda","subscription_plan":null,"subscription_since":null,"username":"Romakita"},"owned":false,"git":null,"preview_secret":null,"privacy":0,"view_count":11884,"pr_number":null,"team":{"avatar_url":"https:\u002F\u002Favatars3.githubusercontent.com\u002Fu\u002F1763311?v=4","id":"24a3d393-76ee-4e45-87a7-9058b2fe6eda","name":"Romakita"},"updated_at":"2020-11-18T07:48:58","forked_template":{"color":"#61DAFB","icon_url":"github","id":"38c233cd-c676-4bd7-a376-fb3f2891951d","official":false,"published":true,"title":"mongoose","url":null},"description":null,"user_liked":false,"forked_from_sandbox":null,"room_id":null,"fork_count":2,"version":111,"always_on":false,"base_git":null,"npm_dependencies":{}};