A .NET 8 Web API in C#, based on the Visual Studio Web API template (Weather Forecast).
Live URL: WeatherForecast API
Live URL: KeepAlive API
Connect to UptimeRobot to avoid the 50-second delay on the first call.
look at KeepAliveController.cs
file
- Go to Render.com and sign up for a free account.
- After signing up, log in to your Render dashboard.
- In the Render dashboard, click on the "New" button and select "Web Service".
- Connect your GitHub repository containing your C# web API project to Render.
- Name: Give your service a name.
- Environment: Select Docker.
- Build Command: Leave this blank as the Dockerfile handles the build process.
- Start Command: Leave this blank as the Dockerfile specifies the ENTRYPOINT.
- Dockerfile Path: If your Dockerfile is in the root of the repository, leave this as
Dockerfile
. - Docker Context Directory: If your Dockerfile is in the root, set this to
/
.
- Click on "Create Web Service".
- Render will start the build process, pulling the necessary images, building your project, and deploying the service.
Your web service should now be up and running on Render.com!
- Create a Render Account: Sign up at Render.com.
- Deploy Your API:
- Connect your GitHub repository.
- Configure the service to use Docker.
- Deploy your application.
- Use Supabase free Postgres DB with
Npgsql.EntityFrameworkCore.PostgreSQL
. - Use Auth0 for free JWT login.
- Create a Vercel Account: Sign up at Vercel.com.
- Deploy Your Website:
- Connect your GitHub repository.
- Configure the project settings.
- Deploy your website.
- Overcome CORS with Serverless Functions:
- Use Vercel's serverless functions to proxy API requests.
- Handle CORS issues effectively.