samchon / backend

A template repository for TypeScript backend server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run dev server?

MarvinXu opened this issue · comments

I can't access the api server either by running npm run dev or npm run start

open http://127.0.0.1:37001/ got an ERR_CONNECTION_REFUSED

PS: I have connected to my database and got schema created by npm run schema, and there is no error in the console

I'm testing backend server only by npm run test command, and do not opening dev server for manual testing.

If you want to do that, just run both of them:

  • npm run build:main
  • npm start

I ran the above commands but still can't access the api.
image

image

Because your have not defined the / path.

But shouldn't it at least return a 404 response? I tried http://localhost:37001/monitors/performance, still the same.

image

Working fine.

git clone https://github.com/samchon/backend
pnpm i
npm run build:main
npm start

Got it working by adding hostname 0.0.0.0. My server is running in WSL.

await this.application_.listen(MyConfiguration.API_PORT(), '0.0.0.0');

Okay, I'll adjust your case. Thanks for reporting.