Skip to content

veggie2u/hapijoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Hapi Hapi Joi Joi

This is code for a simple web server using the node based Hapi server, and Joi, a validation library. This project and it's code is for a blog post that is located at

Note: the examples use ES6. The project was created on Node v6.2.2

##Install & Run These commands will pull down the required libraries, and then run the node server defined in index.js.

npm install
node index.js

##Endpoints

  • localhost:9000 => 'Hello World!'
  • localhost:9000/hello?name=Jim => 'Hello Jim!'
  • localhost:9000/hello/Bob => 'Hello Bob!'
  • localhost:9000/validate?name=Jim => 'Hello Jim'
  • localhost:9000/validate?name=bobsyouruncle => 400

##Swagger

  • localhost:9000/documentation

About

Demo node server using hapi and joi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published