UNPKG

1.85 kBMarkdownView Raw
1
2# Igo.js Introduction
3
4Igo.js is a full-featured Node.js web framework for developing web applications.
5
6Igo is not a boilerplate to help you start with Node.js. It embeds and leverages on the most used frameworks and libraries in the Node.js ecosystem.
7
8In a few seconds it can give you a production-ready application and a 100% working development environment.
9
10We love Node.js, it's a fantastic and easy technology to build and run web applications.
11But after building several projects, we found that it was a pain to duplicate these many *technical* files:
12- `app.js` for Express and its bunch of middlewares, plus the configuration for these middlewares,
13- `Gulpfile.js` or `webpack.config.js` to setup a nice development environment,
14- MySQL, Redis, SMTP configurations and connections,
15- `package.json` with so many dependencies,
16- `Mocha` configuration and tools to write good tests,
17- ...etc.
18
19After several months spent duplicating the same configuration and the same technical stack over and over, well, it appeared clearly that all this had very little added value. That's how Igo.js was born.
20
21## Installation
22```sh
23# install mocha
24npm install -g mocha
25
26# install igo
27npm install -g igo
28```
29
30## Getting started
31```sh
32# create new project
33igo create myproject
34cd myproject
35
36# install node.js dependencies
37npm install
38
39# start the server on http://localhost:3000
40npm start
41```
42
43## Configuration
44The Igo configuration is located in `/app/config.js`.
45The configuration is initialized at startup, and can be retrieved through igo module:
46```js
47var config = require('igo').config`;
48```
49
50Some configuration parameters can be defined with environment variables. Igo uses [dotenv](https://github.com/motdotla/dotenv), so you can just add/override variables in the `/.env` file.
51E.g:
52```txt
53# development database
54MYSQL_DATABASE=mydatabase
55```