public
Description: Nitrogen Web Framework for Erlang
Home | Edit | New

Installing Nitrogen

Installation Steps
======

1. Copy or check-out Nitrogen into a subfolder called nitrogen-master of
$ERL_LIBS. So if $ERL_LIBS is /opt/erlang-libs/ then copy to
/opt/erlang-libs/nitrogen-master.

2. Change to $ERL_LIBS/nitrogen-master and run ‘make’ to build Nitrogen.

3. Create a symlink to the nitrogen script to a bin directory in your path:

sudo ln -s $ERL_LIBS/nitrogen-master/support/nitrogen \ /usr/local/bin/nitrogen

4. Start a new project in a folder of your choosing with the command:

nitrogen create myfirstweb

5. Visit http://nitrogenproject.com/ for documentation and help.

Note On $ERL_LIBS
=====

If you do not have the $ERL_LIBS environment variable add the following line
to ~/.profile or ~/.bash_profile depending on your computer setup:

export ERL_LIBS=/opt/erlang-libs/

Of course change the path to the location you wish to use. Install other
modules, such as mochiweb, yaws, erl-mysql and any other you may need, in a
subfolder of $ERL_LIBS as well.

For various reasons, I couldn’t set $ERL_LIBS, and when compiling I saw the following error:

./src/pages/web_index.erl:2: can’t find include lib “nitrogen/include/wf.inc”

Copying the compiled nitrogen lib into “/usr/local/lib/erlang/lib” solved this.

Note On Compiling and Starting
=====

To compile, just run: make

To change the default port from 8000 to (e.g) 8001; add the following to the erl argument line, in your start.sh script:

-myfirstweb port 8001 \
Last edited by tobyhede, Wed May 20 02:27:02 -0700 2009
Home | Edit | New
Versions: