Improvements

This commit is contained in:
David Ralph
2019-04-06 17:56:51 +01:00
parent 5709a33c23
commit c768ebc41f
9 changed files with 73 additions and 81 deletions

View File

@@ -1,18 +1,18 @@
<div align="center">
<div align='center'>
<br />
<p>
<img src="media/kirb.gif" /><h1 style="font-size:107px;">Kirbe</h1>
<img src='media/kirb.gif' /><h1 style='font-size:107px;'>Kirbe</h1>
</p>
<br />
<p>
<a href="https://packagephobia.now.sh/result?p=kirbe"><img src="https://packagephobia.now.sh/badge?p=kirbe" alt="Install Size" /></a>
<a href="https://discord.gg/SV7DAE9"><img src="https://discordapp.com/api/guilds/107131083958538240/embed.png" alt="Discord" /></a>
<a href="https://www.npmjs.com/package/kirbe"><img src="https://img.shields.io/npm/v/kirbe.svg?maxAge=3600" alt="NPM version" /></a>
<a href="https://www.npmjs.com/package/kirbe"><img src="https://img.shields.io/npm/dt/kirbe.svg?maxAge=3600" alt="NPM version" /></a>
<a href="https://www.patreon.com/wessel"><img src="https://img.shields.io/badge/donate-patreon-F96854.svg" alt="Patreon" /></a>
<a href='https://packagephobia.now.sh/result?p=kirbe'><img src='https://packagephobia.now.sh/badge?p=kirbe' alt='Install Size' /></a>
<a href='https://discord.gg/SV7DAE9'><img src='https://discordapp.com/api/guilds/107131083958538240/embed.png' alt='Discord' /></a>
<a href='https://www.npmjs.com/package/kirbe'><img src='https://img.shields.io/npm/v/kirbe.svg?maxAge=3600' alt='NPM version' /></a>
<a href='https://www.npmjs.com/package/kirbe'><img src='https://img.shields.io/npm/dt/kirbe.svg?maxAge=3600' alt='NPM version' /></a>
<a href='https://www.patreon.com/wessel'><img src='https://img.shields.io/badge/donate-patreon-F96854.svg' alt='Patreon' /></a>
</p>
<p>
<a href="https://nodei.co/npm/kirbe/"><img src="https://nodei.co/npm/kirbe.png?downloads=true&stars=true" alt="npm installnfo" /></a>
<a href='https://nodei.co/npm/kirbe/'><img src='https://nodei.co/npm/kirbe.png?downloads=true&stars=true' alt='npm installnfo' /></a>
</p>
</div>
@@ -33,11 +33,11 @@ const kirbe = require('kirbe'); // Define kirbe
const app = new kirbe.Server(); // Make your kirbe instance
app.route('/bear', 'GET', (req, res) => res.status( 200 ).body({ 'bear': 'cop' }) );
app.route((req, res) => res.status(404).body('Error: Content not found!').end() );
app.route('/bear', 'GET', (req, res) => res.status( 200 ).body({'bear': 'cop'}));
app.route((req, res) => res.status(404).body('Error: Content not found!').end());
app.get('/kirb', (req, res) => {
res.writeHead( 201, { 'test': 'hi' });
res.end({ 'key': 'hi' });
res.writeHead(201, {'test': 'hi'});
res.end({'key': 'hi'});
});
// HTTP
@@ -55,9 +55,9 @@ Host static files on your website
const path = require('path'); // Define path
const kirbe = require('kirbe'); // Define kirbe
const app = new kirbe(); // Make your kirbe instance
const app = new kirbe.Server(); // Make your kirbe instance
app.use(kirbe.static(path.join(__dirname, 'static')));
app.use(kirbe.Static(path.join(__dirname, 'static')));
```
### Creating your own