Git Product home page Git Product logo

saturn-example's Introduction

Saturn Example

The Saturn App Template is best developed with Visual Studio Code or Visual Studio 2019 (Community works).

More about Saturn

https://saturnframework.org/docs/

http://kcieslak.io/Reinventing-MVC-for-web-programming-with-F

This is for pure F# web applications and should be preferred over the original web app template.

Here is a list of the possible target frameworks. https://docs.microsoft.com/en-us/dotnet/standard/frameworks

Features

  • Example CAS setup
  • Examples of an access restricted application using two routes
    • Logged In View
    • Default View
  • Examples cookies setup where you can plug in EDS requests to get membership and other user details

How to get me running

Make sure you have .NET Core 3.1 SDK installed

  1. Clone me
  2. Add a hostname
    1. saturn.local 127.0.0.1
  3. Add an environment variable. This will tell ASP.NET Core that you want to use Development settings
    1. key: ASPNETCORE_ENVIRONMENT
    2. value: Development
  4. Copy appsettings.json and rename it to appsettings.Development.json
  5. DO NOT PUT SENSITIVE SECRET SETTINGS IN appsettings.json. ONLY PUT SETTINGS IN appsettings.Development.json. NEVER COMMIT appsettings.Development.json
    1. You do not need to change the settings to get the app to run. Only do this when you use the temaple to build a real application.
  6. Install paket
    1. dotnet tool install paket
    2. dotnet tool restore
  7. Install fake
    1. dotnet tool install fake-cli
    2. dotnet tool restore
  8. Run the build and launch the app
    1. In cmd go to the root of the application.
    2. Do dotnet fake build target Run
    3. The app should launch in a browser

Test Framework

Required

See the paket.dependencies file for all testing libraries

  • Excpecto

Optional Recommendations

How to host development on IIS

By default this template will run as self-hosted using Kestrel, but you can host on IIS too.

  1. Add a site to IIS and point it to the WebHost folder
  2. Configure the bindings to whatever port you want to run it on. The template uses 8085.
  3. Configure the Application Pool to use No Managed Code
  4. Configure the web.config file
    1. Make sure processPath points to where the executable is stored when the project is built. This is template puts it here: .\bin\Debug\net461\Template.Saturn.WebHost.exe

You can also host on IIS as a published site

The above steps will get you there but instead of pointing to the WebHost folder, use Visual Studio or dotnet publish to create a published site and use that in IIS. You may need to copy over the web.config file manually. I don't know why.

Deploying to Azure

TODO

I might be running on Azure

https://saturn-example.azurewebsites.net/

You can login with your Net ID.

saturn-example's People

Contributors

marneedear avatar tebeco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

saturn-example's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.