Added some cheatsheets

This commit is contained in:
Zoheb Alli Khan 2021-06-03 23:14:49 +05:30
parent 24faa1e1c1
commit b9be6c4cbc
1 changed files with 14 additions and 2 deletions

View File

@ -103,8 +103,20 @@ Properties```app.local`;
`app.locals.title = "My Cheatsheet";
console.dir(app.locals.title)`;
console.dir(app.locals.title)`; // Creating objects with local variables
app.mountpath`
``app.mountpath``const admin = express()`;
``app.mountpath``const admin = express()
admin.get('/', function(req,res){
console.log(admin.mountpath)
res.send('Admin Homepage')
})
app.use('<admin dir>', admin)`; // Mounting a sub - app
``Event``
`admin.on('mount', (parent){
console.log('Admin Mounted')
})` //