Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Elefrant/elefrant

Repository files navigation

ELEFRANT Logo ELEFRANT

wercker status Dependency Status

ELEFRANT is a framework for an easy starting point with Node.js based applications. It is designed to give you a quick and organized way to start developing ELEFRANT API SERVERS with useful components and configurations. We mainly try to take care of the connection points between existing popular frameworks and solve common integration problems.

Prerequisites

  • Node.js - Download and Iמstall Node.js.
  • Git - Get git using a package manager or download it.
  • Grunt - Download and Install Grunt.
  $ sudo npm install -g grunt-cli

Init Framework

First install the cli module in your system. This will add the elefrant command which lets you interact (install, manage, update ...) your elefrant based server.

  $ sudo npm install -g elefrantio
  $ elefrant init <path or name of your new API>
  $ cd <path or name of your new API> && npm install

And start your own API server.

Invoke node with Grunt

We recommend using Grunt to start the server:

  $ grunt

If grunt aborts because of JSHINT errors, these can be overridden with the force flag:

  $ grunt -f

On developer and test enviroment, grunt will launch server.js, but in production enviroment, grunt will launch cluster.js.

Troubleshooting

During installation depending on your os and prerequiste versions you may encounter some issues.

Most issues can be solved by one of the following tips, but if are unable to find a solution feel free to contact us via the repository issue tracker or the links provided below.

Update NPM or Grunt

Sometimes you may find there is a weird error during install like npm's Error: ENOENT. Usually updating those tools to the latest version solves the issue.

  • Updating NPM:
  $ sudo npm update -g npm
  • Updating Grunt:
  $ sudo npm update -g grunt-cli

Cleaning NPM cache

NPM has a caching system for holding packages that you already installed. We found that often cleaning the cache solves some troubles this system creates.

  • NPM Clean Cache:
  $ npm cache clean

Installation problems on Windows 8 / 8.1

Some of Elefrantio dependencies uses node-gyp with supported Python version 2.7.x. So if you see an error related to node-gyp rebuild follow next steps:

  1. install Python 2.7.x
  2. install Microsoft Visual Studio C++ 2012 Express
  3. Run NPM update
  $ npm update -g

Documentation

Documentation for the entire framework can be found on the Elefrant documentation.

CLI

The Elefrantio is a simple Command Line Interface for installing and managing ELEFRANT applications. As a core module of the elefrant.com project, it provides a number of useful tools to make interaction with your ELEFRANT application easier, with features such as: scaffolding, component creation and status checks.

  $ elefrant
  $ elefrant --help
  $ elefrant help

elefrant help can also be used in conjunction with any command to get more information about that particular functionality. For example, try elefrant help init to see the options for init

  $ elefrant help [command]

Staying up to date

After initializing a project, you'll see that the root directory of your project is already a git repository. ELEFRANT uses git to download and update its own code. To handle its own operations, ELEFRANT creates a remote called upstream. This way you can use git as you would in any other project.

To maintain your own public or private repository, add your repository as remote. See here for information on adding an existing project to GitHub.

  $ git remote add origin <remote repository URL>
  $ git push -u origin master

Contributing

All issues and pull requests should be filed on the develop branch repository.

Credits

License

MIT © Elefrant