-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to specify nested service path #388
Comments
Hi Peter, no worries - if you need to ask there is either something missing from the documentation or the API is not self explanatory as it should be.
static void Main(string[] args)
{
string envName= GetEnvironmentString(); // returns "dev"
var env = Layout.Create()
.AddService<MyService>("service")
.Add(CorsPolicy.Permissive());
var root= Layout.Create()
.Add(envName, env);
Host.Create()
.Handler(root)
.Console()
.Run();
} For web applications, this is a powerful tool to define the structure of the app - especially when it comes to attach behavior by using concerns (see the according section in the documentation). I just created the following issues to make this more clear:
Hope this helps. Cheers |
This makes perfect sense, thank you! The documentation is very interesting to me. Its very good at explaining certain high level concepts. I think I'm struggling with certain areas of implementation as it assumes knowledge of various industry standard approaches. My speciality has always been game development, delving into more regular .Net for side projects etc, so I've missed a lot of those standards. Perhaps an expansion to the templates section with various common implementations with comments to explain structure and reasoning could help? Regardless, this project has been by far the most useful tool for me to create quick API's for my game projects so I'm keen to see its progress :) |
Yes, I think comments in the templates could be useful, also with links to the documentation. Created the following issue for this one: |
Hi again :)
I'm trying to implement environment setup so that my server path goes from
http://mydomain.com/service?whatever=1
to
http://mydomain.com/dev/service?whatever=1
The most logical course to do this was (in my head) to change my layout service assignment to add it there.
For example:
However, querying this with
http://mydomain.com/dev/service
returns 404, despite my earlier call of just/service
working perfectly.Apologies for what seem like simple questions, I'm trying to debug these as thoroughly as possible before bringing them before you.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: