0.0.8 • Published 6 years ago
@server-status/api-plugin-auth v0.0.8
Authorization plugin for Server Status API
GraphQL API for simple authorization to server-status
Use
It is plugin so you need use the @server-status/api or you can adapt to yours ApolloServer. But if you choose my solution you need to do this steps:
$ npm install @server-status/api @server-status/api-plugin-author
$ yarn add @server-status/api @server-status/api-plugin-authCreate file e.g. index.js
const ServerStatus = require('@server-status/api')
const config = {
plugins: [
{
name: '@server-status/api-plugin-auth',
config: {
users: [
{
name: 'dragon',
pass: 'dragon',
}
],
secret: 'pancake-is-the-best-dragon',
}
},
],
}
ServerStatus(config).listen()And run server
$ node index.jsLicence
MIT