77 Replies
a year ago
basically there's dotnet the web framework, people usually likes to use it's default version (which follows the MVC model, Model View Controller)
a year ago
and then there's the dotnet minimal APIs (same framework, different strategy), which are very easy to understand and build something quick
a year ago
you can follow this tutorial from Microsoft:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-9.0&tabs=visual-studio
so by the end i should have a github repo with the API launched from github on railway like a python api?
also is there example finished code of this minimal api?
a year ago
hopefully it'll be Railway ready but if something happens when deploying it just send a message on this help thread.
a year ago
there may be some examples on Github but not specially made for Railway
(mainly because i dont know what the github file structure is meant to look like)
a year ago
I can try but I would recommend following a tutorial, on Railway we can't teach an entire language just by help threads.
true. however this is all i have right now, and i dont think its going to deploy with just this XD

do i need like a requirements.txt type of thing?
just because railway acts different to the C# i know
a year ago
I may be able to get a simple template for you, give me a minute
im used to flask, this is new lol, however i know C# is lightweight, especially for a server
a year ago
I would recommend to stick to the language you know, C# can get pretty big and if you're looking for lightweight solutions, Go is the option
its good to learn something new + i really need C# for what im creating
a year ago
great, that's a valid point
I'm going to head off, if you can get the template i would be blown away XD
a year ago
can I ask on why you need C#?
a year ago
but that can be done in any language
a year ago
that still can be done in any language, including Python
a year ago
how many players are you expecting?
a year ago
Python can be pretty capable of running a beef game
a year ago
pretty sure it can handle + you know Python so I would do it in Python
a year ago
depends on what you're doing
a year ago
I would create a POC and see how it goes
a year ago
Proof of Concept
i wouldnt mind doing c#, i know a bit because of unity
and software developement
We could always just do this?
again if you think python might work, i can use it
a year ago
I highly recommend doing a POC in the language you know and see how it goes
a year ago
but I've seen some real-time games made in Python
do you mind providing a template as well? so i can rollback if it doesnt work?
a year ago
np
alright, going to bed, cant wait for this template in the morning! Thanks a lot
Okayie Tried python and its response times, they are fine, however the CPU usage is not, what is a lightweight language I can use on railway to minimise CPU usage?
a year ago
Go is the way
a year ago
pog
a year ago
just watch out, Gin can use a lot of memory and in some benchmarks Gin lose to ElysiaJS (yes a js framework)
a year ago
but for your use case it should be fine
Uh ohs, as long as I dont eat up my money with the cpu, (thats why i switched from python to go)
a year ago
The only way to find out is by testing but Go is pretty lightweight overall
Alright, as i said I did a stress test, and it came out at $10 for 50 clients on python xD (10 mins usage)
a year ago
if you're looking for something focused on being lightweight, there's Go-Chi
https://go-chi.io/#/
a year ago
but try Gin first, it's easier to understand
a year ago
time for a load test, that's all i can say
a year ago
i forgot to mention but I did a C# template 😅
