admin
123456
git clone https://github.com/whitecodel/ashani-admin.git
cd ashani-admin
npm install
npm run dev
now code is running on internal ip 127.0.0.1 and port 3000
here you can setup
in this file there is a function createadmin() this function is called as soon as the app is run which creates a new admin
in this file there is a function imageFilter() you can use this function with multer to validate a image
in this file there is a function sendEmail() You can use this function to send email
sendEmail({to, subject, body});
There are 2 middleware files in it. Adminauth.js and Appauth.js have middleware made for admin and app respectively, you can create all your middlewares here.
NotLoggedIn => checking loggedin in both file
You can create all your models here.
In public folder you can put your static files like css, js, images
In this folder you can create all your views for admin or app. If you do not know how to use ejs, then you can see the documentation by visiting its official website ejs.co.
success =>
successSnackbar(msg);
failed =>
failedSnackbar(msg);
default position is bottom-right if you want to change position you can pass extra parameter
EX: successSnackbar(msg, "bottom-right")
gitbrent bootstrap4-toggle is now enabled
EX:
<input
name="approved"
type="checkbox"
id="approved"
data-width="100%"
data-toggle="toggle"
data-on="Approved"
data-off="Not Approved"
data-onstyle="success"
data-offstyle="danger"
/>