0.8.3 • Published 9 months ago

pallies v0.8.3

Weekly downloads
16
License
MIT
Repository
github
Last release
9 months ago

Pallies

Build Status Coverage Status

Pallies is a user management plugin for hapi, designed to work best with hapipal.

Resources

Features

  • Supports hapi v18+
  • Built-in support for user invite and forgot password tokens
  • Powerful configuration using Confidence
  • Strong password encryption using Argon2
  • Use any database supported by Knex and Objection

Getting Started

This guide assumes you've already created a hapi project using hpal

Looking for a starting point? Check the Pallies Demo Repo.

Install the Pallies module from npm

npm install --save pallies

Configure Pallies

Create a configuration file at server/.palliesrc.js

Example Pallies configuration

Update Your Manifest

// Register Pallies as a plugin in `lib/plugins/pallies.js
'use strict';

const PalliesConfig = require('../../server/.palliesrc');
const User = require('../models/user');

module.exports = (server, options) => ({
    plugins: {
        options: {
            isDev : options.isDev,
            ...PalliesConfig
        }
    }
});
// Register Schwifty in server/manifest.js
{
    plugin: 'schwifty',
    options: {
        $filter: { $env: 'NODE_ENV' },
        $default: {},
        $base: {
            migrateOnStart: true,
            knex: {
                client: 'pg',
                connection: {
                    host: { $env: 'DB_HOST' },
                    user: { $env: 'DB_USER' },
                    password: { $env: 'DB_PASSWORD' },
                    database: { $env: 'DB_DATABASE' }
                },
                migrations: {
                    stub: 'Schwifty.migrationsStubPath'
                }
            }
        },
        production: {
            migrateOnStart: false
        }
    }
}

Update knexfile.js

Add the Pallies migration directory to your migrations configuration

// ...
migrations: {
    directory: [
        'node_modules/pallies/lib/migrations',
        Path.relative(process.cwd(), PluginConfig.migrationsDir)
    ]
}
//...

Apply database migrations

npx knex migrate:latest
0.8.1

11 months ago

0.8.3

9 months ago

0.8.2

9 months ago

0.7.2-1

1 year ago

0.7.2-0

1 year ago

0.7.3-rc.0

1 year ago

0.7.2-2

1 year ago

0.7.1-0

1 year ago

0.7.2

1 year ago

0.7.0

1 year ago

0.6.0

2 years ago

0.6.1-0

2 years ago

0.5.1

2 years ago

0.5.0

3 years ago

0.4.0

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago