Angular 2 & NancyFX sample application with persistence, JWT authentication and other stuff.
This tiny web application is a WIP sample for a Angular 2 web application using C# and NancyFX as a REST backend.
The sample shows:
* A possible loosely coupled structure of a Nancy-based REST backend
* Integrated Persistence Layer with a database, NHibernate, Schema Migrations
* Integrated Session per Request Pattern using Nancy
* Host Angular Application inside Nancy Application Host
* REST Authentication and Authorization using JWT
So what is NoteBucket?
NoteBucket is a fictional and awesome app that lets you store thoughts and wisdom as virtual notes.
Notes are categorized by folders and each user can define as many folders as he or she wants.
So it's basically the online version of the good old Microsoft Notepad.
Currently, folder and note creation is not implemented, just note updates. You can play with the demo data provided (see below).
This will take you approx. 5 minutes:
-
Clone
-
Open the Solution File within Visual Studio or Mono Develop
-
Build the Solution. All assemblies are put into the artifacts/ folder.
-
Run the build-db.cmd or build-db.mono (don't forget to chmod +x on Linux / Mac) to build the SQLite database schema
-
Run NoteBucket.Backend.HostApplication.exe
-
REST is ready on localhost:5000
-
Navigate to localhost:5000/api/demo to create some demo data
-
Shell "cd NoteBUcket.Frontend/"
-
Shell "npm install"
-
Shell "gulp"
-
The web application gets compiled and artifacts are stored under artifacts/Content
-
localhost:5000/ to start the app
Generated Test Logins: [email protected], Password: mightypirate [email protected], Password: beepbeep
WIP.
WIP. Brief description of Persistence implementation coming soon.
WIP. Brief description of Authentication/Authorization implementation coming soon.
The sample is not perfect, I've put it together within a day. I really welcome any feedback, improvements and features to the app.