UNPKG

teleprice-quoting-system

Version:

a live feed pricing system for exchanges, wire services, and telegraphic news. Use in indexing pricing and matching indexed prices.

25 lines (21 loc) 754 B
const { Keystone } = require('@keystonejs/keystone'); const { Text, Password } = require('@keystonejs/fields'); const { PasswordAuthStrategy } = require('@keystonejs/auth-password'); const { AdminUIApp } = require('@keystonejs/app-admin-ui'); const keystone = new Keystone(); keystone.createList('User', { fields: { username: { type: Text }, password: { type: Password }, }, }); const authStrategy = keystone.createAuthStrategy({ type: PasswordAuthStrategy, list: 'User', config: { identityField: 'username', // default: 'email' secretField: 'password', // default: 'password' }, }); // Enable Admin UI login by adding the authentication strategy const admin = new AdminUIApp({ authStrategy });