1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-12-22 10:08:54 +00:00

Added some cheatsheets

This commit is contained in:
Zoheb Alli Khan 2021-06-03 23:14:49 +05:30
parent 24faa1e1c1
commit b9be6c4cbc

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')
})` //