• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LilyLiya
博客园    首页    新随笔    联系   管理    订阅  订阅
2021年2月3日
bootstrap + express
摘要: bootstrap_navbar + express 阅读全文
posted @ 2021-02-03 13:37 LilyLiya 阅读(217) 评论(0) 推荐(0)
Serving Static Assets In Express
摘要: app.use(express.static(path.join(__dirname, 'public'))); 阅读全文
posted @ 2021-02-03 12:21 LilyLiya 阅读(46) 评论(0) 推荐(0)
Subreddit demo with data.json file
摘要: ...data 阅读全文
posted @ 2021-02-03 11:45 LilyLiya 阅读(148) 评论(0) 推荐(0)
loops in EJS
摘要: simple example: baby cats lists 阅读全文
posted @ 2021-02-03 09:37 LilyLiya 阅读(46) 评论(0) 推荐(0)
if else in EJS
摘要: <% %> VS <%= %> 阅读全文
posted @ 2021-02-03 09:17 LilyLiya 阅读(171) 评论(0) 推荐(0)
subreddit demo of ejs: pass parameters into pjs
摘要: const { subreddit } = req.params; 阅读全文
posted @ 2021-02-03 09:04 LilyLiya 阅读(65) 评论(0) 推荐(0)
EJS interpolation syntax : pass data to templates
摘要: 在ejs文件中使用js的数学公式,生成随机数字。 <%= Math.floor(Math.random()*10) + 1 %> res.render('random.ejs', {bubble: num}) <%= bubble %> 阅读全文
posted @ 2021-02-03 08:37 LilyLiya 阅读(86) 评论(0) 推荐(0)
Creating Servers with Express
摘要: Request & Response Objects; Express Routing Basics; Express Path Parameters; Working With Query Strings; Auto-Restart With Nodemon 阅读全文
posted @ 2021-02-03 08:05 LilyLiya 阅读(76) 评论(0) 推荐(0)
configuring express for ejs
摘要: app.set('view engine', 'ejs'); res.render('home.ejs') ; setting the views directory; const path = require('path'); app.set('views', path.join(__dirname, '/views')) //__dirname is where index.js is located 阅读全文
posted @ 2021-02-03 08:03 LilyLiya 阅读(70) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3