Eggbox is a website for uploading, viewing and downloading Fantom pods. Eggbox is fanr compatible and backed by MongoDB.
To see Eggbox in action, visit http://eggbox.fantomfactory.org/.
Use Eggbox to host your very own pod repository, be it at home or at work! Eggbox is easy to setup and simple to configure.
- Editable Pod properties
- Enhanced Fandoc documentation
- syntax highlighting
- table support
- link to images in pods
broken link reporting
Atom (RSS) feeds for individual pods
- Open Graph markup on pod summary pages
- Sitemap XML generation
- Basic Gravatar integration
Eggbox with the Fantom Pod Manager ( FPM ):
C:\> fpm install afEggbox
Eggbox with fanr:
C:\> fanr install -r http://eggbox.fantomfactory.org/fanr/ afEggbox
To use in a Fantom project, add a dependency to
depends = ["sys 1.0", ..., "afEggbox 0.1"]
Full API & fandocs are available on the Eggbox - the Fantom Pod Repository.
Start an instance of MongoDB:
C:\> mongod MongoDB starting db version v3.0.5 waiting for connections on port 27017
If Eggbox was installed as a pod, start the website with:
C:\>fan afEggbox 8069 ___ __ _____ _ / _ | / /_____ _____ / ___/__ ___/ /_________ __ __ / _ | / // / -_|/ _ /===/ __// _ \/ _/ __/ _ / __|/ // / /_/ |_|/_//_/\__|/_//_/ /_/ \_,_/__/\__/____/_/ \_, / Alien-Factory BedSheet v1.4.12, IoC v2.0.10 /___/ IoC Registry built in 303ms and started up in 892ms Bed App 'Eggbox' listening on http://localhost:8069/
Or if using the Eggbox standalone application, just run the script. (Edit the script to change the port.)
- Point your browser to http://localhost:8069/ and Job Done!
Eggbox may be run as a (portable) standalone application without the need to have Fantom installed. Just download the
.zip file from Eggbox Downloads Page, extract, and run the bundled script.
Note that the standalone application does require
java to be installed and available on the command line.
The website is configured with various properties which may be set as environment variables, or overridden by a
config.properties file. The
config.properties should be in the current / same directory that the website is started in.
This defines the MongoDB instance Eggbox should connect to. It takes the form of the standard MongoDB connection URL:
afEggbox.mongoDbUrl = mongodb://db1.example.net:2500/?connectTimeoutMS=30000
afEggbox.publicUrl = http://eggbox.fantomfactory.org
The contact details, as shown as a link in the bottom left hand corner of all Eggbox pages, are set via the following properties:
afEggbox.contactName = Micky Mouse afEggbox.contactEmail = email@example.com
Contact details are disabled by default.
If the following properties are set then, Google's Universal Analytics script is included on all public pages.
afEggbox.googleAccNo = XX-99999999-9 afEggbox.googleAccDomain = //eggbox.fantomfactory.org/
See Google Analytics's Pod for more details.
Google analytics is disabled by default.
Eggbox can email a detailed error report whenever an unhandled error occurs on the server. To enable, set the following properties:
afEggbox.errorEmails.smtpHost = mail.example.com afEggbox.errorEmails.smtpPort = 25 afEggbox.errorEmails.smtpUsername = micky.mouse afEggbox.errorEmails.smtpPassword = password afEggbox.errorEmails.smtpSsl = false afEggbox.errorEmails.sendTo = firstname.lastname@example.org
Email sending is disabled by default.
Eggbox can log events to MongoDB. To enable, set the following properties to true:
afEggbox.logDownloads = true afEggbox.logActivity = true
The event info is not currently used, but may be used to present statistics in future repository releases.
Event logging is disabled by default.
The admin user has access to, and may edit, all pods. The admin user is any user with the same email address as this property.
afEggbox.adminEmail = email@example.com
The admin user is disable by default.
If this property is set, then should anyone visit a private URL, they will be automatically logged in as this user.
afEggbox.autoLoginEmail = firstname.lastname@example.org
Note that the user must already exist on the system.
Auto login is disabled by default.
TIP: By setting
afEggbox.autoLoginEmailto the same email address (and having people bookmark a private URL such as
/my/pods) you create an open pod repository accessible to all.
Eggbox may have an optional About page. To enable, create an
about.fandoc file in the current / same directory that the website is started in, next to
config.properties. Existence of this file enables the About link in the top nav bar. The file is rendered as the About page.
The About page is disabled by default.
Sometimes it is convenient to have different configurations for different environments, such as
test. All the Eggbox properties may have environment specific properties that override the normal properties. Just prefix them with the environment:
afEggbox.mongoDbUrl = mongodb://localhost:27017/eggbox dev.afEggbox.mongoDbUrl = mongodb://localhost:27017/eggbox-dev test.afEggbox.mongoDbUrl = mongodb://localhost:27017/eggbox-test
Using the properties above will make Eggbox connect to the
eggbox database by default, but it will connect to
eggbox-dev in a
dev environment and to
The environment is set via the command line
C:\>fan afEggbox -env test 8069
Note that all Eggbox properties may be overridden in the same manner.
Here is a sample
config.properties for you to cut'n'paste. Uncomment / remove the leading
# symbol, from any line you wish to use.
# config.properties for Eggbox # **************************** # # See http://eggbox.fantomfactory.org/pods/afEggbox # #afEggbox.mongoDbUrl = mongodb://localhost:27017/eggbox #afEggbox.publicUrl = http://example.com #afEggbox.contactName = Micky Mouse #afEggbox.contactEmail = email@example.com #afEggbox.googleAccNo = XX-99999999-9 #afEggbox.googleAccDomain = //example.com/ #afEggbox.errorEmails.smtpHost = mail.example.com #afEggbox.errorEmails.smtpPort = 25 #afEggbox.errorEmails.smtpUsername = micky.mouse #afEggbox.errorEmails.smtpPassword = password #afEggbox.errorEmails.smtpSsl = false #afEggbox.errorEmails.sendTo = firstname.lastname@example.org #afEggbox.logDownloads = true #afEggbox.logActivity = true #afEggbox.adminEmail = email@example.com #afEggbox.autoLoginEmail = firstname.lastname@example.org
The following, non-Fantom, libraries and services are used by Eggbox:
- Jasny Bootstrap Row Link
- jQuery Throttle / Debounce