Skip to content

zoe-1/hapitimes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapitimes

Compose a hapijs server configured with: multiple plugins registered, tls,
validation tools, an authentication system, server logging, and 100% test coverage.

http://www.hapijs.com

Register Plugins With The Server

Utilize hapijs' modular plugin design to make plugins which:

  • are configured to use a prefix.
  • serve static files: css, images, and JavaScript.
  • render html templates with a configured template engine.
  • utilize partial html templates.
  • make use of helpers to generate data for html templates.
  • Use hapijs / glue to compose a hapijs server that loads all application plugins.

Configure Your Server with tls (template layer security)

  • Use openssl to generate a self signed security certificate.
  • Configure glue's manifest file to compose a server with tls (template layer security).
  • What is Transport Layer Security?

Perform Validation with joi

  • configure plugins to use joi.
  • Utilize hapijs / joi plugin to validate POST AND GET requests.

Authenticate Users With hapi-auth-cookie

  • Configure the application to use hapijs / hapi-auth-cookie.
  • Configure glue to load the authentication plugin.
  • Create basic login system.

Testing

  • Configure the application to use hapijs / lab and hapijs / code to make tests.
  • Write tests that cover 100% of the application.

Logging

  • Configure the server to make log records.
  • Write logs to file.

Project Packages

hapijs / hapi
hapijs / hoek
hapijs / hapi-auth-cookie
hapijs / joi
hapijs / lab
hapijs / code
hapijs / crumb


Things to Consider:

  • Which authentication plugin is best for the tutorial?
    npm/newww used hapi-auth-cookie so I chose it.
  • Need to add crumb to the project? hapijs / crumb
    It seems crumb is designed for a webapi rather than website.

About

Tutorial to build a hapijs server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages