Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 404: "Cannot GET /" #22

Open
SimonAlling opened this issue Mar 4, 2020 · 1 comment
Open

HTTP 404: "Cannot GET /" #22

SimonAlling opened this issue Mar 4, 2020 · 1 comment

Comments

@SimonAlling
Copy link

$ git clone https://github.com/vrudikov/typescript-rest-boilerplate
$ cd typescript-rest-boilerplate/
$ npm install
$ npm run swagger
$ npm run build
$ docker-compose up -d

This works fine.

$ docker ps
CONTAINER ID        IMAGE                                                     COMMAND                  CREATED             STATUS              PORTS                      NAMES
2977545f512e        typescript-rest-boilerplate_typescript-rest-boilerplate   "docker-entrypoint.s…"   4 minutes ago       Up 4 minutes        0.0.0.0:3000->3000/tcp     typescript-rest-boilerplate_typescript-rest-boilerplate_1
ce8bbe5d18fe        mongo:latest                                              "docker-entrypoint.s…"   4 minutes ago       Up 4 minutes        0.0.0.0:27017->27017/tcp   typescript-rest-boilerplate_mongo_1

But when I go to http://127.0.0.1:3000 (as suggested under UI Test), I get a 404 response with this body:

Cannot GET /

I expected a clearer indication that the service is up and running; should I?

@Bogay
Copy link

Bogay commented Apr 8, 2021

In src/api-server.ts, add endpoint: '/' to the options parameter may help.
It will look like this.

Server.swagger(this.app, { endpoint: '/', filePath: './dist/swagger.json' });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants