zavin-as

A convenient web application server


Keywords
zavin, application, server, web server
License
MIT
Install
npm install zavin-as@0.0.2

Documentation

About zavin-as

zavin-as is a convenient web application server which uses convention over configuration, helping developers in their tedious journey when working on their Node.js/Express web projects. zavin-as allows you to create individual separate deployable web apps within zavin-as.

Features

  • Create and register independent web apps including assets
  • Play around between development or production mode
  • Live update when editing HTML, CSS files
  • Use bundled modules in your web app

Setup

zavin-as can be deployed in Linux, Mac OS, Unix or Windows machine with 4GB memory, 100GB disk space. zavin-as prefer 64-bit Linux and Mac OS X for production deployments. zavin-as requires:

Read the instructions how to setup each before installing. To follow the installation steps below make sure to include this tools in the PATH environment variable.

No Grunt/Gulp? As our preference to keeping things simple we do not want to struggle working around with Grunt or Gulp. Instead, we use npm as our build tool. I know npm cannot be compared with these two powerful tools but its just a matter preference.

Quickstart

$ git clone https://github.com/frlorenzo/zavin-as.git

Next, install dependencies

$ cd zavin-as
$ npm install

On a separate terminal window start your mongodb server:

$ mongod

Starting

You can start zavin-as for production use or use it for development.

To run for development use

$ npm run debug

Open you browser then point to http://localhost:3000

To start for production use

$ npm start

Open you browser then point to http://localhost:8080

Notice the difference in port numbers assigned. This can be changed in the system config file config.json. More on that below. Alternatively you can also run and start zavin-as via run and start commands located in the bin directory.

Creating an Application

  1. From the zavin-as project copy the etc/template directory to app/hello-world
$ cp -r etc/template app/hello-world
  1. Modify the app/hello-world/config.json file, setting the name property from "template" to the value "hello-world"

  2. Register the hello-world app by adding it in the app/register.js. The regsiter.js file should look something like

...
require("./default");
require("./hello-world");
  1. Assuming zavin-as is running in debug mode point your browser to http://localhost:3000/hello-world. Your Web browser should now display the welcome message

  2. That's it. You can now hack into your app or add more features into it!