Running Iboxdb with Dnxcore5 is described in the previous article, but if you use other components that do not support DNXCORE5, you will see the following prompt
/dnxcore/project.json (19,27): Error nu1002:the dependency Nancy 1.4.3 does not support framework dnxcore,version=v5.0.
Nancy is a practical. NET Web framework that simply makes a request test of its own server, with an average of 2000 requests per second, which can handle 100 million requests a day, which is sufficient for most sites, but currently it does not support Dnxcore.
At this point, you can change the run environment configuration, the Dnx "frameworks": {"Dnxcore5" ...} for "frameworks": {"Net45" ...}.
"Dependencies": { "iboxdb": "2.7.0.3", "Nancy": "1.4.3", " Nancy.Hosting.Self ":" 1.4.1 "}," Frameworks ": { " net45 ": { " frameworkassemblies ": { " system.runtime ":" 4.0.0 ", " System.IO ":" 4.0.0 ", " System.Collections ":" 4.0.0 "}} }
You then set the path for mono on the terminal, and there are some differences in how paths are installed.
Export dotnet_reference_assemblies_path="/usr/lib/mono/xbuild-frameworks"
If the path is not set, the runtime will have the following prompt
Error dotnet1012:the Reference Assemblies directory is not specified. You can set the location using the DOTNET_REFERENCE_ASSEMBLIES_PATH environment variable.
Complete the basic setup can write code on the Program.cs, Iboxdb and Nancy are a few lines of code to complete a function of the design, the demo code here, a few lines of code to start the database, a few lines of code to start the Web server and implementation of the insertion and query functions, not here to copy again.
After writing the code, you can follow the instructions in the previous article.
dotnet Restoredotnet Run
Start the Web database application. Then open the browser, enter Http://localhost:1234/insert insert data, enter HTTP://LOCALHOST:1234/SELECT/1 query data.
Dnx using the Mono library to run Iboxdb and Nancy