How to access baserow API directly on my VPS

I am using express to build an API for my app. In my express app, I am trying to call baserow api which is deployed as a docker container on the same VPS. here’s my docker-compose.yml

version: '3'

services:
  baserow:
    image: baserow/baserow:latest
    container_name: baserow
    environment:
      - BASEROW_PUBLIC_URL=https://baserow.example.in
    volumes:
      - /dcode/baserow-data:/baserow/data
    ports:
      - "127.0.0.1:3001:80"
    restart: unless-stopped

I am able to access the api using the BASEROW_PUBLIC_URL in my express app but when I use localhost:3001 to directly access the api, i am not able to do that. Please help

solved the issue, i found that api can be accessed only through the BASEROW_PUBLIC_URL, so i added this in my hosts file

127.0.0.1 baserow.example.in

any request to baserow.example.in will stay in my local VPS (no internet round trip)

Hey @yashkumar! I’m glad to see you got your issue resolved. :slightly_smiling_face: