This is a WebSite implementation with GlintCMS. It shows how you can use GlintCMS.
make sure you have got node.js installed on your system.
so far it has been tested with node 0.12.x and 4.x on mac os x and on ubuntu.
# for development, nodemon is helpful
npm install -g nodemon
this starter contains a whole web site including the data storage.
It uses the filesystem as the storage adapter: glint-adapter-fs
.
Therefore you don't have to install a database to run it.
you can install it as a module for your express or connect application.
# install in your app
npm install glintcms-starter-glintcms --save
# copy the datastore into your app
cp -r node_modules/glintcms-starter-glintcms/datastore/ datastore
you can run it as a standalone application like this:
var options = {};
var glintcms = require('glintcms-starter-glintcms')(options);
glintcms.listen(process.env.PORT || 3000);
or you can mount it into your web application:
var express = require('express');
var app = express();
var options = {};
var glintcms = require('glintcms-starter-glintcms')(options);
app.get('/', function(req, res, next){
res.send('<h1>my new homepage</h1> check it out: <a href="/cms">GlintCMS</a>');
});
app.get('/cms', function(req, res, next){
req.url = '/';
next();
});
app.use(glintcms.app);
app.listen(process.env.PORT || 3000);
you can install it with git clone. this is the preferred way, when you want to take it as a starting point to develop your own app with GlintCMS
# change directory into the directory you want `glintcms-starter-glintcms` to be created
git clone https://github.com/glintcms/glintcms-starter-glintcms && cd glintcms-starter-glintcms
# setup for production
npm run setup
# setup for development
npm run setup-www
# build it and run it
npm run build && node start
# or build for development
npm run build-www
# and start with automatic restart on file changes
npm run www
# if you want to run it with a specific port
export PORT=3000; npm run www
# start with specific options with the substack/subarg synthax
node start.js --upload [ --get /up* ]
- open the website: http://localhost:8080/
- login via: http://localhost:8080/login
- user:
content@intesso.com
- password:
ContentContent
The directories local_modules/*
contain the local_modules that are bundled with this starter project.
These modules are like normal unpublished npm modules, that are just contained in this project. It does not really make sense to publish them because they are very project specific.
The advantage to treat them as npm modules are:
- They are self contained and have defined dependencies in the
package.json
. - It is easier to copy them into another project
- It lets you avoid deep relative links
During development
These modules are symlinked into the node_modules
directory, when running npm run setup-www
or local_modules link -f
In production
When running npm run setup
or local_modules install -f
they are copied into the node_modules
directory
Andi Neck | @andineck | andi.neck@intesso.com | intesso
Any Feedback is highly appreciated. Please create an Issue or PR. I'm happy to add you as a comitter too.
MIT