Simple todo web app using ASP.Net 6 MVC with a MySQL database.
- Just hit the green play button
-
Install .NET 6.0 SDK (6.0.400). This is the only version I know of that works in Railway.app at the time of creating this project. You can change the SDK version in
./global.json
. -
You can now run this command:
Profiles are stored in
Properties/launchSettings.json
$ dotnet watch run --launch-profile HotReload
- Add a property group in the
<AppName>.csproj
file. This property group will only be applied during production.
<PropertyGroup Condition="'$(Configuration)' != '' AND '$(Configuration)' != 'Debug'">
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
- Add a MySQL database in your Railway project and connect your github repo
- Once it is connected and your website is built add these vars:
MySQL variables will be automatically generated. See Program.cs to know how it is consumed.
PORT
: 3000 (It is usually this number but you can check it when your website is done building in the Deployments > View Logs)