0.9.0 • Published 6 months ago

pallies v0.9.0

Weekly downloads
16
License
MIT
Repository
github
Last release
6 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.9.0

6 months ago

0.8.1

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.7.2-1

2 years ago

0.7.2-0

2 years ago

0.7.3-rc.0

2 years ago

0.7.2-2

2 years ago

0.7.1-0

2 years ago

0.7.2

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.6.1-0

3 years ago

0.5.1

3 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago