An open API service indexing awesome lists of open source software.

https://github.com/nullstone-io/aspnet-quickstart

ASP.NET Quickstart for Nullstone
https://github.com/nullstone-io/aspnet-quickstart

Last synced: 3 months ago
JSON representation

ASP.NET Quickstart for Nullstone

Awesome Lists containing this project

README

          

# ASP.NET Quickstart

This is an ASP.NET Core Web App Quickstart for [Nullstone](https://nullstone.io).
This is based off the official [ASP.NET Core get started](https://docs.microsoft.com/en-us/aspnet/core/getting-started/?view=aspnetcore-6.0) tutorial.

This quickstart is set up with:
- ASP.NET Core 6
- HTTPS disabled (handled by AWS infrastructure)

## How to launch via Nullstone

1. Create a public web app. (Remember `app-name` for later)
2. Add a subdomain. (this will add a Load Balancer capability)
3. Provision
```shell
nullstone up --wait --block= --env= --var=service_port=9000
```
4. Build, push, and deploy
```shell
docker build -t aspnet-quickstart .
nullstone launch --source=aspnet-quickstart --app= --env=
```

## Running locally

You can run this project locally inside Docker or using a dev server.
The docker setup is configured to hot reload; you don't have to rebuild/restart the container when you change code.

### Docker

```shell
docker compose up
```

Visit [http://localhost:5001](http://localhost:5001).

### Dev Server

```shell
dotnet watch run
```

Visit [http://localhost:5192](http://localhost:5192).

### Hot reload

The `app` in `docker-compose.yml` is configured to automatically reload changes to code.
You do not need to rebuild/restart the app when making changes to code.

### Update dependencies

To make changes to dependencies, make changes to your project and restart your docker container.
`dotnet restore` happens automatically at the boot of the docker container to update dependencies.

```shell
docker compose restart app
```

## Details on quickstart

This web app was generated following these steps.
1. `dotnet new webapp --no-https -o .`
2. `dotnet new gitignore`