# Serverless offline commands is not running the server properly & API hits gives 502 (BAD GATEWAY)

**URL:** <https://forum.serverless.com/t/serverless-offline-commands-is-not-running-the-server-properly-api-hits-gives-502-bad-gateway/20285>\
**Category:** Serverless Framework\
**Tags:** aws, api-gateway\
**Created:** [June 20, 2024, 6:59pm UTC](https://forum.serverless.com/t/serverless-offline-commands-is-not-running-the-server-properly-api-hits-gives-502-bad-gateway/20285 "2024-06-20T18:59:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mach666](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/mach666/32/7949_2.png) [@mach666](https://forum.serverless.com/u/mach666)\
**Post date:** [June 20, 2024, 6:59pm UTC](https://forum.serverless.com/t/serverless-offline-commands-is-not-running-the-server-properly-api-hits-gives-502-bad-gateway/20285/1 "2024-06-20T18:59:38Z")

</div>

I am running a `serverless` project build with AWS . The project is having multiple services and every service is having multiple functions for which there are APIs. I am trying to set-up the project on my local and run a service. I am using `serverless offline` to run the service on my local. The command `serverless offline` is not running the service completely as I am not able to see the message `Server ready: http://localhost:3000 🚀` on console but it only listing the APIs endpoint . However with `lsof -i` command I found that `port:3002` & `port:3000` are running processes and `http://localhost:3000/` gives the typical `404 : root not found` error with list af all the `existing-endpoint` but hitting any `endpoint` gives `HTTP STATUS CODE 502 (BAD GATEWAY)` and nothing gets print on console as well
