Skip to content

Quickstart

Lukasz Sielski edited this page Apr 20, 2016 · 1 revision

Project Creation

You can start from scratch, or use up to date boilerplate. Below we describe step by step project setup (from scratch).

1. Init new node project

npm init
npm i --save lackey-cms

2. Create database

We would use here my-db-name as our site database name.

createdb `whoami` || true
createdb 'my-db-name' || true

3. Create empty hook file

echo "{}" > lackey.json

4. Create site

We will use default as project name and core as main module name (both default values).

mkdir -p sites/default
mkdir -p sites/default/config
mkdir -p sites/default/modules/core

4.1 Config file

In sites/default/config/default.js (see boilderplate)

'use strict';

module.exports = {
    datasources: {
        pg: {
            'default': {
                dsn: 'postgres://localhost/my-db-name'
            }
        }
    },
    rebuild: {
        sass: true
    },
    yml: {
        //drop: true,
        override: '*'
    },
    host: 'http://localhost:8888/'
};

4.2 Module definition

In sites/default/modules/core/module.yml

name: My Website

require:
    - cms/users
    - cms/cms

5. Run Application in Debug Mode

npm run debug