Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
sevr
Advanced tools
Readme
Sevr is modern Node.js framework for building custom content management systems. Sevr is built on a composable architecture allowing you to creating custom solutions with only the features they need, and nothing you dont.
Disclaimer: This is still in alpha stages and as such, the api is likely to change.
The best way to first get started with the Sevr is to follow the tutorial, sevr-tutorial. This will guide you through the setup and common patterns while building a simple blog. If you'd like start from scratch, however, please read on.
Note: Sevr requires a MongoDB instance. This guide assumes one is already set up and running.
Sevr is available from npm
npm install --save sevr
In order to run the application, a few directories and files are needed. The
following top-level directories are required: collections
, types
. These
directories can remain empty for now. Additionally, an index.js
should be
added to the root of the project.
By default, Sevr will start a new database called 'sevr' on localhost:27017, however this is easily configured:
connection: {
host: 'localhost',
port: 27017,
username: null,
password: null,
database: 'sevr'
}
const Sevr = require('sevr')
const config = {}
const sevr = new Sevr(config)
// Start it up
sevr.start()
.then(() => {
sevr.logger.verbose('Ch-check it out. Sevr is ready to go!')
})
.catch(err => {
sevr.logger.error(err.stack)
})
// Start the Express web server
sevr.startServer()
Collections are at the heart of any application on the Sevr framework, and are
analogous to tables in a relational database. Collections are created by first
defining them, with a collection definition, a JavaScript object, which defines
the structure and behavior of data within that collection. Collection
definitions are defined in the collections
directory. Each defintion should
be in its own file. More information on creating collection definitions can be
found with the Collection API.
Sevr provides many standard data types for collections, but there are times
where a custom type will need to be defined to offer specific behavior. Like
collection definitions, these are JavaScript objects, which define the
underlying data type, validation, and various meta information. Custom types
are defined in the types
directory. Each type should be in its own file.
More information on creating custom types can be found with the
Type API.
The core framework for Sevr is very lean, which mostly offers a base for working with the data layer and providing a web server instance. Most applications built on the Sevr Framework will need to add a few plugins to enable the features needed for a full functioning system. The lean core here, allows for great flexibility without adding a lot of unnecessary bloat to your projects. More information about plugins can be found with the Plugin API
Tests are run using Mocha, and create a test database, sevr-test
.
npm test
This project is licensed under the MIT license.
FAQs
A modern framework for building custom content management systems
The npm package sevr receives a total of 6 weekly downloads. As such, sevr popularity was classified as not popular.
We found that sevr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.