Neolithic Populous Metropolis
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

boxescms

0.6.8 • Public • Published

boxescms

ExpressJS based API centric static site CMS.

Underlying tools

Kickstart Development

  1. npm init (If you haven't already)

  2. npm install boxescms

  3. npx boxes init

  4. npm start dev

Folder/File Structure

/.env

Env variables. Copy from .env.example.

/app.js (optional)

Optional app.js to extend the Express app instantiated from BoxesCMS. Must export a function that receives the app as first argument.

/data/**/*.{js,json,yml}

Data layer for static HTML generation from /web/pug/**/*.pug. **/* must match between the relative path of /data and /web/pug. See Template Data section for more details.

/server/

Server and node related files.

/server/api/

Only API routes. All routes are prepended with /api, appended with folder/file relative path. Routes should be declared using require('express').Router().

/server/routes/

Additional custom routes.

/web/

Web related files (html, pug, sass, scss, js, images, statics).

/public/

Web files will be compiled here, and served as root static by Node server.

/storage/

Contents should be ignored. Storage folder for various runtime data usage.

/conf/

External configuration files.

Builders

JS

There is 2 special env var that you can use in your JS files:

  • process.env.VERSION
  • process.env.BUILD_HASH

process.env.VERSION is taken from your project's package.json.version.

process.env.BUILD_HASH is a randomly generated per build 64 length hex char.

Keywords

none

install

npm i boxescms

Downloadsweekly downloads

19

version

0.6.8

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar