Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodepress

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodepress

Lightweight blog engine for node

  • 2.0.0-beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-96.72%
Maintainers
1
Weekly downloads
 
Created
Source

NodePress

NodePress is a lightweight blog engine for node.js. At its current state it is useful as a compact library or boilerplate for a modular and extendible blog engine.

NodePress' web server is built on top of node-router. What is added on top of the server is a plugin functionality which renders one, or multiple, pair or individual set of client and server endpoints. Client endpoints being react components. This can be seen in any of the core plugin implementations, on /src/plugins.

Plugin system

NodePress relies on a plugin system to function. A plugin is an object that indexes frontend (React components) and backend (Fastify routes) endpoints to be served via the server. For that reason, NodePress allows for easily extendible and naturally modular projects.

By default, NodePress contains five plugins which make up a simple blog engine that renders markdown and latex math equations (using marked and katex). Those plugins are reader, feed, fetch, post, and user. The user plugin contains essential user authorisation and management, while the other four make up the blog engine. It is possible to ignore all those plugins by initialising NodePress with the boolean ignoreCorePlugins. If you ignore core plugins, you can still manually load one or many of them, such as if you wish to use the user plugin but not provide a blog.

Initialisation example

import { NodePress, Arguments } from 'NodePress';

const isDevEnv = process.argv.includes('--dev');
const config: Arguments = {
    dev: isDevEnv,
    plugins: [],
    ignoreCorePlugins: false
};

const instance = new NodePress(config);

Database

NodePress uses MongoDB for database and Mongoose as interface by default.

Post schema

The following is the default structure of a post object.

{
	_id: ObjectId
	title: string
	content: string
	metadata: {
		date: Date
		author: string
		...
	}
}

License

MIT

Keywords

FAQs

Package last updated on 23 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc