GithubHelp home page GithubHelp logo

mfernstrom / nom Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 5.54 MB

Nom - CLI tool for developing and deploying CFML applications

License: GNU General Public License v3.0

Pascal 100.00%
cfml openbd lazarus freepascal cli heroku jetty coldfusion object-pascal deploy

nom's Introduction

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

What can it do?

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

What's it going to be able to do?

Installing

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.

nom's People

Contributors

mfernstrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nom'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.