Rewyre UI is a beautiful admin system plugin for the Rewyre framework.
Rewyre UI is a plugin for the Rewyre framework that extends the base functionality with rendering abilities and a fully featured admin system, offering plugins that use it to extend it and add their own functionality.
You can install from NPM with:
npm install --save rewyre-ui
Below is a simple example showing a database connection and a simple find, for a more in-depth example, have a look at the test
folder in the source, which has a simple to-do demo.
Note: The expectation is that this framework is to be used with TypeScript specifically and that you would you use your own tooling for building and compiling it, of course, you can use JavaScript and babel instead, but it is suggested to use TypeScript, for help with setting up, look at the tsconfig.json file inside of the test folder.
// Import the parts we need.
import { Framework, Drivers } from 'rewyre';
import RewyreUI from 'rewyre-ui';
// Create an isolated async function.
(async() => {
// Create an instance of the framework.
const application: Framework = new Framework({
port: 3005,
database: true,
databases: [
{
unique: 'primary',
host: 'localhost',
port: '27017',
name: 'example-app',
driver: Drivers.MONGO,
default: true,
},
],
});
// Load the plugins.
application.use(RewyreUI);
// Start the server.
await application.start();
})();
Then head over to: http://localhost:3005/admin.