harland

0.20.0 • Public • Published


Harland logo

Harland title

The small and complete web framework.

Harland is a small, fast and complete web framework for NodeJS.

It differentiates from the other unopinionated tools by following its own well defined path. Meaning that you don't have to think about the structure of your project, leave the hard decisions to Harland.

It comes bundled with multiple useful modules ready to be used, working as an powerful abstraction layer builded on top of Node JS without sacrificing performance.

Note: The core code of the framework is available at Harland-framework.

Features

  • Clean: There's always a clean and good way to do web development, Harland follows that way while being easy and simple.

  • Complete: The framework covers almost everything necessary to build a complete web app in a short amount of time.

  • Fast: The Harland modules are fast and they only get loaded if it's neccesary.

  • Small: The codebase is small in size and dependencies (only 4 including the framework itself).

Modules

These are some of the utilities available at Harland:

  • Route: Powerful system for making clean routes, it includes multiple features.

  • Language: For managing multi-language sites.

  • DI Container: For doing IoC in the simplest way.

  • Middleware: For taking care of your request cycle.

  • Cookies and Sessions: Manage cookies and sessions as you want.

  • Standard library: With a lot of useful functions that can be called natively.

And much more...

Example

system/web.js

const Harland = require('harland-framework');
const Route = Harland.get('route');
 
Route.get('/home', (req, res) => {
    res.end('hello world');
});

Or use a controller:

app/controllers/home.js

const Harland = require('harland-framework');
const Controller = Harland.get('controller');
 
Controller.valid([
    'home'
]);
 
module.exports = class Home {
    index(req, res) {
        res.end('hello world');
    }
}

Then running Harland is as simple as: node index.js.

Those pages will be accessible at localhost:8080/home (if your port is set to 8080).

Testing

Assuming you have installed Harland, open your favorite terminal, move to your Harland project folder and run:

npm test

Make sure you temporarily remove or rename your system/web.js file and app folder, so they don't interfere with the test.

Documentation

First time using it? Read the Wiki.

Want to create your first page? Read the Starting - wiki.

Contributing

Any contribution or support to this project in the form of a pull request or message will be highly appreciated. ❤️

Don't be shy :)

License

Harland is open-source software licensed under the MIT license.

Package Sidebar

Install

npm i harland

Weekly Downloads

3

Version

0.20.0

License

MIT

Unpacked Size

134 kB

Total Files

45

Last publish

Collaborators

  • usbac