Expressful
Essential web technologies in one package.
Currently in development
$ npm install expressful --save
Quick start
Expressful sets up a Node.js web server for the rest of us.
// app.jsconst app = root: __dirname;app;appstart;
Expressful is a tiny wrapper around the most popular Node.js web framework Express.js, loved by many.
Read the total beginner guide on how to run an Expressful app
Is Expressful right for me?
You want to make branding websites. So you learn HTML, CSS, and maybe JavaScript.
Soon you get overwhelmed by technologies such as Node.js, Express.js, build tools such as gulp) and CSS processors such as CSS Next to name a few.
Although essential, these tools have steep learning curves.
Expressful brings you these essential web technologies in one package.
Expressful gets out of your way. You focus on content, design and publishing your website.
Websites that you should build with Expressful
- App landing pages
- Small business websites
- Portfolio's
Goals of Expressful
- Remove setup time
- Easy for beginners
- Focus on content and design
- Focus on HTML and CSS
- Favors convention over configuration
- Keep your
package.json
dependencies list lean
A simple project structure
Expressful is focused on content, HTML and CSS. Most of your projects will look somewhat like this:
.
|-- /node_modules/ # contains dependencies such as expressful
|-- /public/ # contains assets such as images and fonts
|-- /css/ # contains css files
|-- /content # contains json and cson content files
| |-- /about.json
| └-- /index.cson
|-- /views/ # contains html files
| |-- /about.html
| └-- /index.html
|-- /app.js # starting point of your node app
└-- /package.json # information about your app and dependencies
Content directory
Expressful is based on a Content First design approach. Start by putting your text in cson or json files in your content directory.
Each file represents a page on your actual website.
Basic content routing example
Nunjucks templating
Expressful uses the nunjucks templating engine by default.
It's setup with Remarkable
and highlight.js
which makes it easy to write content in Markdown
Expressful sets up Express.js with useful defaults
The Expressful app
is just an Express.js app with useful defaults.
Calling expressful()
sets up a express
app for you with those useful defaults.
const expressful = ;const app = ;
- sets up static directory for
/public
- mutes favicon request by default
- sets up
nunjucks
templating (withRemarkable
andhighlight.js
) - sets up the following modules
body-parser
compression
errorhandler
morgan
serve-favicon
errorhandler
Note: multer
, cookie-parser
and express-session
are not in here
API Reference
Expressful is a tiny wrapper around Express.js. It offers some extra functions that make it even easier to work with:
Configuration
Expressful is focused on convention over configuration. However, there is some configuration available:
const expressful = ; // Values are defaultsconst app = ;
Setting the root is advised
// This would work in most cases, it works on Heroku for exampleconst app = ; // This will work anywhereconst app = root: __dirname;
Author & License
Created by Jeroen Ransijn under the MIT license.