Skip to content

Commit

Permalink
fix catalog service vietnam-devs#14
Browse files Browse the repository at this point in the history
  • Loading branch information
thangchung committed Aug 14, 2018
1 parent f55d15b commit 355eaae
Show file tree
Hide file tree
Showing 13 changed files with 3,671 additions and 167 deletions.
4 changes: 4 additions & 0 deletions src/services/catalog-typescript/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=production
MONGO_PORT=27017
PORT=5002
BASE_PATH=/
14 changes: 14 additions & 0 deletions src/services/catalog-typescript/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:alpine

RUN mkdir -p /usr/src/services/catalog-typescript
WORKDIR /usr/src/services/catalog-typescript

ARG service_version
ENV SERVICE_VERSION ${service_version:-v1}
EXPOSE 5002
ENV NODE_ENV production

COPY ./src/services/catalog-typescript/ /usr/src/services/catalog-typescript/
RUN yarn install

ENTRYPOINT [ "yarn", "start" ]
12 changes: 12 additions & 0 deletions src/services/catalog-typescript/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"verbose": false,
"ignore": [".git", "node_modules/**/node_modules", "src/**/*.spec.ts"],
"watch": ["src/**/*.ts"],
"env": {
"NODE_ENV": "development",
"PORT": "5002",
"BASE_PATH": "/"
},
"ext": "ts",
"exec": "ts-node ./src/server.ts"
}
24 changes: 15 additions & 9 deletions src/services/catalog-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "catalog",
"name": "catalog-service",
"version": "0.0.1",
"description": "",
"description": "This is a catalog-service for coolstore project.",
"scripts": {
"start": "npm run build && node ./dist/server.js",
"build": "npm run clean && npm run swagger-gen --basePath $BASE_PATH && npm run routes-gen --basePath $BASE_PATH && tsc",
"dev": "npm run build && nodemon",
"build": "npm run clean && npm run swagger-gen && npm run routes-gen && tsc",
"clean": "rimraf dist",
"swagger-gen": "tsoa swagger",
"routes-gen": "tsoa routes",
"swagger-gen": "cross-env-shell \"tsoa swagger --basePath $BASE_PATH\"",
"routes-gen": "cross-env-shell \"tsoa routes --basePath $BASE_PATH\"",
"tsoa": "tsoa"
},
"author": "Luke Autry <lukeautry@gmail.com> (http://www.lukeautry.com)",
"author": "Thinh Nguyen",
"license": "MIT",
"dependencies": {
"body-parser": "^1.15.2",
Expand All @@ -19,15 +20,20 @@
"mongoose": "^5.0.14",
"swagger-ui-express": "^3.0.10",
"tsoa": "^1.0.0",
"uuid": "^3.3.2"
"uuid": "^3.3.2",
"dotenv": "^6.0.0"
},
"devDependencies": {
"@types/body-parser": "0.0.30",
"@types/express": "^4.0.30",
"@types/express": "^4.0.36",
"@types/method-override": "0.0.27",
"@types/node": "^6.0.33",
"@types/mongoose": "^5.2.5",
"@types/node": "^8.0.7",
"cross-env": "^5.2.0",
"ncp": "^2.0.0",
"nodemon": "^1.18.3",
"rimraf": "^2.5.2",
"ts-node": "^7.0.1",
"tslint": "^3.11.0",
"typescript": "^3.0.1"
},
Expand Down
Loading

0 comments on commit 355eaae

Please sign in to comment.