Bed Nap v0.1.1

An Example BedSheet Application (BedApp)

Visit Bed Nap Hotel >>

Click [ > HERE < ] to play with the sample Bed Nap Hotel web application.


BedNap is a simple BedSheet application with master / detail screens that can be used as a template to kickstart your own Bed Apps.

BedNap exists so developers can browse the source code and see for themselves how easy it is to piece together a working application with BedSheet and other libraries. BedNap also features acceptance tests that probe the generated HTML and verifies the markup.

Visit for a live demo of Bed Nap!

Quick Start

1. Install

Install Bed Nap with the Fantom Repository Manager:

C:\> fanr install -r afBedNap

2. Create

Create your own working web application by replicating Bed Nap in to a working directory. Do this with the following command, where podname is the name of your web application.

C:\> fan afBedNap -copyto C:\temp\ -podname myBedApp

Copied 21 files to 'C:\temp\myBedApp'
Bed App 'myBedApp' has been created!

This creates a copy of Bed Nap in C:\temp\myBedApp with the name myBedApp.

3. Run

You can now build, test and run your new web app straight away!


To build, cd into the temp directory and run:

C:\temp\myBedApp> fan

compile [myBedApp]
  Compile [myBedApp]
    FindSourceFiles [10 files]
    WritePod [file:/C:/Apps/Fantom/fan/lib/fan/myBedApp.pod]


Test the app with fant:

C:\temp\myBedApp> fant myBedApp

*** All tests passed! [2 tests, 4 methods, 19 verifies]

Run App

Run the web application with:

C:\temp\myBedApp> fan myBedApp

   ___    __                 _____        _
  / _ |  / /_____  _____    / ___/__  ___/ /_________  __ __
 / _  | / // / -_|/ _  /===/ __// _ \/ _/ __/ _  / __|/ // /
/_/ |_|/_//_/\__|/_//_/   /_/   \_,_/__/\__/____/_/   \_, /
           Alien-Factory BedSheet v1.5.2, IoC v3.0.2 /___/

BedSheet started up in 1,809ms

And point your web browser at: http://localhost:8069/

4. Repeat

Feel free to modify the fantom source, web templates, and tests. To see the results, just rebuild the pod with fan and refresh your browser!

Source Code

If you can't wait to download Bed Nap and create your own working web application, you can browse the source code below. Click on a file to view it:

You can also view the source code over at BitBucket at: