This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
server: | |
build: ./ | |
command: sh -c "npm run start:debug" | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./src:/home/usr/app/src | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cache: | |
key: ${CI_COMMIT_REF_SLUG} | |
paths: | |
- node_modules/ | |
- .npm/ | |
default: | |
image: node:16.9.0 | |
variables: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request from "supertest"; | |
describe("cats (e2e)", () => { | |
const req = request("http://localhost:3000"); | |
const cat = { | |
name: "meow", | |
age: 1, | |
breed: "foo", | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx nest start & | |
$ npx wait-on --httpTimeout 5000 http://localhost:3000/cats/health | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [NestFactory] Starting Nest application... | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [InstanceLoader] DynamooseModule dependencies initialized +69ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [InstanceLoader] DynamooseCoreModule dependencies initialized +1ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [InstanceLoader] DynamooseModule dependencies initialized +14ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [InstanceLoader] CatsModule dependencies initialized +2ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [RoutesResolver] CatsController {/cats}: +15ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [RouterExplorer] Mapped {/cats, POST} route +4ms | |
[Nest] 57 - 11/26/2021, 9:04:18 AM [RouterExplorer] Mapped {/cats/:name, GET} route +1ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
server: | |
image: node:16.9.0 | |
container_name: server | |
tty: true | |
stdin_open: true | |
depends_on: | |
- mongo | |
command: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
634a3a3b003d node:16.9.0 "docker-entrypoint.s…" 16 seconds ago Up 13 seconds server | |
75dff98622a6 mongo "docker-entrypoint.s…" 9 minutes ago Up 15 seconds 27017/tcp medium_mongo_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
server: | |
image: ubuntu:20.04 | |
container_name: server | |
tty: true | |
stdin_open: true | |
depends_on: | |
- mongo | |
- postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const cats = [ | |
{ | |
name: 'meow', | |
age: 1, | |
breed: 'cat' | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16.9.0 | |
WORKDIR /home/usr/app | |
COPY . . | |
EXPOSE 3000 | |
CMD ["npm", "run", "start"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
image: docker | |
services: | |
- name: docker:dind | |
alias: docker | |
stages: | |
- publish | |
before_script: |
OlderNewer