Simple and modular blog engine combining a powerful Markdown render library and a extendable web framework, based on Node.js
This project aims to be small, intuitive and focused in provide a basic solution for a blog engine using Node.js runtime. Only the essential parts are going to be provided and maintained, which creates room for high customization and modularity.
$ git clone https://github.com/phtdacosta/marked-express.git
$ cd marked-express
$ npm i
To run the blog engine server:
$ node ./index.js
In order to begin publishing content, open the browser and go to the following web address:
http://127.0.0.1:3300/write?username=admin&password=12345
Once the engine started successfully, a basic yet useful text editor is going to load in the browser window and the blog is ready to be used.
The basic editor comes with a live Markdown render, allowing the author to write and preview exactly which content is going to be published.
After initial tests, remember to update the user settings.
Main packages at the core of the project:
Auxiliary packages easily replaceable to meet specific needs:
The default configuration file (.config.json
) contains all the settings needed to properly run the project on any system. It is located at the project root directory and uses the JSON format.
{
"hostname": {
"ipv4": "127.0.0.1",
"ipv6": "::1"
},
"protocol": {
"http": {
"port": "3300"
},
"https": {
"port": "443",
"key": "./key.pem",
"cert": "./cert.pem",
"ca": "./"
}
},
"preferences": {
"netlayer": "ipv4",
"applayer": ["http", "https"]
},
"domain": "127.0.0.1:3300",
"username": "admin",
"password": "12345"
}
Sets the server IPv4 address, if available.
Sets the server IPv6 address, if available.
Sets the server port for HTTP traffic, if available.
Sets the server port for HTTPS traffic, if available.
Sets the relative path to SSL/TLS Private Key file, if available.
Sets the relative path to SSL/TLS Certificate file, if available.
Sets the relative path to SSL/TLS Certificate Authority file, if available.
Defines the TCP/IP version used by the server instance. This preference depends on the hostname
parameters.
Possible values:
ipv4
oripv6
Defines the protocol version(s) used by the server instance. This preference depends on the protocol
parameters.
Possible values:
http
and/orhttps
Defines the domain that points to the server. It is used to reference URL addresses related to the blog content.
Be sure to update both
username
andpassword
values. Keeping the default values makes the blog instance vulnerable to unauthorized people to manage it.
Defines the username used by the blog author for authentication.
Defines the password used by the blog author for authentication.
This project exists under the MIT license.