Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Content API Library
require('cmeasy')({
models: [
{
name: 'Home Page',
singleton: true,
definition: {
title: {
type: 'String',
label: 'Home Page Title',
default: 'Default Home Page Title'
}
}
}
]
});
require('http').get({
host: '127.0.0.1',
path: '/api/v1/content/homePage'
});
Or
require('cmeasy')({ /* ... */ })
.then(function(cmeasy){
cmeasy.getModel('homePage').index();
});
Or
<script src="api/v1/content.js"></script>
<script>
console.log(window._cmeasy_content);
</script>
npm install cmeasy --save
See an example running on Heroku https://cmeasy.herokuapp.com/
Or
Deploy your own demo to Heroku
Or
See an example React app using the content on jsfiddle.net
See server/options.js for the complete demo configuration
var express = require('express');
var app = express();
require('cmeasy')({
// ...
express: app
// ...
});
var server = require('http').createServer(app);
server.listen(9000, '127.0.0.1');
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/cmeasy');
require('cmeasy')({
// ...
mongoose: mongoose
// ...
});
// null values indicate that the given property is optional
// By default no models are defined. The following is an example
const models = [
{
name: string,
// If true, more than one instance of this model may exist. If false, only one instance
// can be created
singleton: null | boolean,
disableDelete: null | boolean,
disableCreate: null | boolean,
definition: {
title: {
type: 'String',
label: null | string,
displayColumn: null | boolean,
},
category: {
type: 'Select',
label: null | string,
enum: string[]
},
},
initialData: {
clean: boolean, // Clear all existing models at startup
data: [
{
title: 'A title',
category: 'Category'
}
]
}
}
];
// The following shows the default value for options.initalUsers
const initialUsers = {
// If true, cmeasy will remove all users at startup
clean: boolean,
data: [
{
name: 'Test User',
email: 'test@test.com',
password: 'test'
},
{
name: 'Admin',
role: 'admin',
email: 'admin@admin.com',
password: 'admin'
}
]
};
// Every parameter is optional
const options = {
name: null | string,
mongoose: null | mongoose.Connection,
express: null | express.Application,
rootRoute: null | string,
models: models,
initialUsers: null | initalUsers
}
const cmeasy = require('cmeasy')(options);
TODO
TODO
See website for complete API (TODO)
npm install --global bower
)npm install --global grunt-cli
)mongod
git clone https://github.com/Kauabunga/cmeasy.git
to clone the repositorynpm install
to install server dependencies.bower install
to install front-end dependencies.mongod
in a separate shell to keep an instance of the MongoDB Daemon runninggrunt serve
to start the development server. It should automatically open the client in your browser when ready.Contributing is awesome!
Please ensure your contributions come with tests.
npm version <patch|minor|major>
git push && git push --tags
npm publish
Run grunt build
to build the project
Running npm test
will run the unit tests with karma.
grunt test:server
grunt test:client
nsp
checks with CIFeatures
FAQs
Content API Library
The npm package cmeasy receives a total of 14 weekly downloads. As such, cmeasy popularity was classified as not popular.
We found that cmeasy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.