Skip to content
Nom - CLI tool for developing and deploying CFML applications
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
built_with_fpc_logo.png
built_with_lazarus_logo.png

README.md

Nom - OpenBD CLI Tool

Nom is a commandline tool for OpenBD CFML projects.

OpenBD Website - OpenBD GitHub

OpenBD Banner

Nom is built in FreePascal (Object Pascal)

Built with Freepascal logo

Current Functionality

As of right now, Nom can:

  • Install CFLib UDFs
  • Run server
  • Create project
  • Show info about the current project (Only Nom info at the moment)
  • Download and install MXUnit
  • Deploy to Heroku (See details below)

Planned Functionality

Installing Nom

Nom is a CLI program and needs to be added to your Path.

Mac: http://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/

Windows: http://www.itprotoday.com/management-mobility/how-can-i-add-new-folder-my-system-path

In the future I'll make proper installers.

Create a new project

$ nom -c MyNewProject

This will create the MyNewProject folder, download the latest OpenBD version, and create a nomolicious.ini file.

Adding CFLib UDFs

CFLib has a lot of useful UDFs, for ease-of-use Nom has the ability to install them for you.

Let's say you want to have the CFLib UDF IsWeekDay, just run this command

$ nom -i IsWeekDay

It will download the UDF from CFLib.org, wrap it as a cfcomponent, and save it to the WEB-INF/customtags/cflib/IsWeekDay.cfc directory with the same name as the UDF.

Running the project

To run the project just CD to the project root and run

$ nom -r

This will launch a local Jetty server with the port and maxmemory you set up during the project creation, just hit CTRL-C to shut it down.

You can also tell Nom to open your browser once it's ready by adding the --open option

$ nom -r --open

Deploying to Heroku

Heroku deployment is simple.

Requirements

Process

  • Create a new app in your Heroku account
  • Log into Heroku CLI on your computer (Otherwise Nom can't use Heroku)
  • Enter the name of your app when creating the local project with Nom -c or add a [Heroku] section to the nomolicious.ini file in the project directory:
[Heroku]
ProjectName={The name you picked in Heroku}

Then you can use "nom --deploy --heroku" and it will create a WAR file of the project and deploy to your Heroku account.

OS Compatibility

The code is fairly cross-platform, once Nom's out of Beta status there will be releases for Windows, Mac, and Linux.

Current State

Here's the current nom -h output to give you an idea of what's there and what to expect.

 <-. (`-')_            <-. (`-')  
    \( OO) )     .->      \(OO )_ 
 ,--./ ,--/ (`-')----. ,--./  ,-.)
 |   \ |  | ( OO).-.  '|   `.'   |
 |  . '|  |)( _) | |  ||  |'.'|  |
 |  |\    |  \|  |)|  ||  |   |  |
 |  | \   |   '  '-'  '|  |   |  |  Version 0.2.0
 `--'  `--'    `-----' `--'   `--'
 
 -c          Creates a new project with the latest release of OpenBD
--create 
 
 -r                        Runs the project
--run

--open                    Used with -r/--run to open the browser when the server is ready
 
--website                 Opens the projects Git repo
 
--deploy                  Deploys application with target, only Heroku implemented at the moment
--heroku                  Deployment target - Requires you to be logged into Heroku CLI tools
                              and have a [Heroku] section with a ProjectName=appname in the Nomolicious file
 
 -h                        Shows this wonderful help
--help
 
 -i              Downloads and installs a CFLib UDF to WEB-INF/customtags/cflib/.cfc with the same function name
--install       Example: nom -i IsWeekend. It's then available as a cfc from CFML
 
 -s                        Creates nomolicious.ini file for the current project
--setup
 
 -p                        Show information about the current project
--project

General Information

Language

Nom is written in Object Pascal using Freepascal and Lazarus

License

GPL3

Roadmap/Plan

There's no specific roadmap for this project, it's mostly on an 'I want this functionality so I'm adding it'-type of schedule.

I'm happy to listen to ideas though, please feel free to get in touch if there are things you'd like to see in Nom.

You can’t perform that action at this time.