Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Hueversity turorials assignements PR #35

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.idea
*.iml
npm-debug.log
dump.rdb
node_modules
results.tap
results.xml
config.json
.DS_Store
*/.DS_Store
*/*/.DS_Store
._*
*/._*
*/*/._*
coverage.*
25 changes: 25 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var Hapi = require('hapi');
var Hoek = require('hoek');
var internals = require('../package.json');

var server = new Hapi.Server();

server.connection({ port: 8000 });

server.route({

method: 'GET',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation should be 4 spaces.

path: '/version',
handler: function (request, reply) {
response = {
version: internals.version,
}
return reply(response);
}
});

server.start(function (err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line after function


Hoek.assert(!err, err);
console.log('Hapi server started!', server.info.uri);
});
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "hueniversity",
"version": "0.0.1",
"description": "Hueversity turorials assignements repository",
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/hueniverse/hueniversity.git"
},
"keywords": [
"Hueversity",
"hapi",
"knowledge"
],
"license": "BSD",
"bugs": {
"url": "https://github.com/hueniverse/hueniversity/issues"
},
"dependencies": {
"hapi": "~8.4.0",
"hoek": "~2.11.1"
}
}