1.0.12 • Published 4 years ago

mative v1.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Mative (beta)

Mative open source CMS (currently in BETA!).

Future updates

  • Mative Dashboard.
  • Plugins manager.
  • Manually config installation will be removed.

Installation

Use the package manager npm to install mative.

npm i mative

Usage

Create a file called server.js (or anything you like) in your main directory, and paste the following in it:

const { MativeServer, Mative, Log } = require('mative');

const helmet 		= require('helmet');
const compression 	= require('compression');

(async() => {
	Mative.express('use')(helmet());
	Mative.express('use')(compression());

	await MativeServer.start(__dirname).catch(error => {
		Log('\x1b[31m*Error* Mative -> ' + error + '\x1b[0m');
	});
})();

Your server should be live! You still need to do the setup, you can find this on server-ip:80/mative-setup.

Routers

const { MativeServer, Mative, Log } = require('mative');

const helmet 		= require('helmet');
const compression 	= require('compression');

(async() => {
	Mative.express('use')(helmet());
	Mative.express('use')(compression());

	await MativeServer.start(__dirname).catch(error => {
		Log('\x1b[31m*Error* Mative -> ' + error + '\x1b[0m');
	});

	// The positision of this script doesn't matter, it can be before or after MativeServer.start().
	// https://expressjs.com/en/guide/routing.html
	Mative.express('use')(
		'/index', // this can be anything, like /user/123, /user/:id, /user/:id/dashboard
		require('./www/modules/index') // path to your router
	);
})();

Dashboard

Your dashboard is available on my.mative.io!

License

ISC

1.0.12

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago