ejazahm3d / fullstack-turborepo-starter

Fullstack Turborepo starter. Typescript, Nestjs, Nextjs, Tailwind, Prisma, Github Actions, Docker, And Reverse proxy configured
MIT License
507 stars 61 forks source link

Newbie question #3

Closed salahawk closed 1 year ago

salahawk commented 1 year ago

I'm pretty new to this kind of project structure and I'm wondering how I can test those endpoints I created. I added several endpoints to the backend repo (inside api directory), but couldn't manage to test them on any of these platforms (postman, curl, chrome-browser...).

What is the URL of the backend running?

(I guess, we could have a Discussion section on this repo, so that we can share our experience and ideas) 🙏

AlexandrosMelissas commented 1 year ago

You can find the port in api/main.ts file. It's 5000. So you would do http://localhost:5000/ + endpoint

salahawk commented 1 year ago

I tried, but couldn't get the API working. It said, ACCESS-DENIED. Is port 8080 or 5000? (i tried with 5000)

and the frontend's port is 3000, right? (it works fine)

ejazahm3d commented 1 year ago

Hi. Thats a good suggestion. I will see how I can open discussion section.

By default the backend server should be running on 5000. If you are using docker compose to start all containers including the reverse proxy (nginx), then you should be able to access backend APIs on http://localhost/api

salahawk commented 1 year ago

Yeah, I'm running the repo using Docker, so it is supposed to be running on http://localhost/api, but doesn't work.

Now, I'm writing a decentralized backend (i.e. backend calling blockchain smart contract functions) using nest-web3. It'd be much appreciated if you could help me with a sample demo code or any pseudo code...

Thanks in advance 🙏