This morning I wrote on how to install monodevelop and now I will make my first website using monodevelop.
First thing to do when you work with monodevelop is to install the nuget-plugin.
Now create a VB.Net ConsolApplication.
And then we can go look for Nancy.Hosting.Self via Project > Add Packages
Add that to your project.
And now it is time for some code.
First we make sure we start our host. In the Application.vb file.
Public Class Application Public Shared Sub Main() Dim host = New Nancy.Hosting.Self.NancyHost(New Uri(“http://localhost:1234")) host.Start() Console.ReadLine() End Sub End Class
And then we add an EmptyFile and add this code to it.
Public Class SampleModule Inherits Nancy.NancyModule public Sub New() Me.Get(“/”) = AddressOf Hello End Sub Public Function Hello(ByVal parameters as Object) As String Return “Hello world” End Function End Class
And now open a browser and go to http://localhost:1234/
Did you see the no frills VB.Net? It work but it is lightyears behind VB.Net on windows.