In this blog, I am presenting how to create an admin panel that automatically performs the CRUD operations based on our models.

To do that, I am using Admin Bro which is an automatic UI generator that generates UI based on the models.


  1. Creating a Node JS Project
  2. Creating Models
  3. Creating Admin Panel

1. Creating a Node.js project

Create a new directory and initialize node with the command npm init.

mkdir expresstemplate
cd expresstemplate/
npm init -y
npm i nodemon

Express JS is an open-source web framework for node JS. The below command installs express to our project.

npm install express --save

Installing

Assuming you’ve already installed Node.js, create a directory to hold your application and make that your working…

expressjs.com

package.json

"scripts": {
  "start": "nodemon index.js",
  "test": "echo \"Error: no test specified\" && exit 1"
},

index.js

const express = require('express')
var app = express()
app.get('/', function(req,res){
  res.send('Hello world')
})
app.listen(8000,function(){
  console.log('Listening to PORT 8000')
})

#programming #adminbro #javascript #nodejs #express

Create an Admin Panel with Node.js and Admin Bro
21.90 GEEK