之前好朋友Jacky,每星期四晚上都會家裡聊天,並且唱唱歌。不過最近因為我們兩家都有事情,中斷了一些時間。昨天(0521),大家有空又可以聊天談談音樂了。
Jacky突然剛我說,他聽到繁華攏是夢的日語版,他說感覺很好聽,要不要來練練看?
抓一下它的調,好像是A調還是D調(原曲是C調),感覺都可以。
用Gemini AI
之前好朋友Jacky,每星期四晚上都會家裡聊天,並且唱唱歌。不過最近因為我們兩家都有事情,中斷了一些時間。昨天(0521),大家有空又可以聊天談談音樂了。
Jacky突然剛我說,他聽到繁華攏是夢的日語版,他說感覺很好聽,要不要來練練看?
抓一下它的調,好像是A調還是D調(原曲是C調),感覺都可以。
用Gemini AI
http://localhost:3000/about?test=1#history
https://google.com/#q=express
| 協定 | 主機名稱 | 連接埠 | 路徑 | 查詢字串 | 片段 |
| http:// https:// | localhost google.com | :3000 | /about / | ?test=1 | #history #q=express |
片段:
片段(fragment)(或雜湊 (hash)),不會傳至伺服器,它完全是供瀏覽器使用的。單頁應用程式或重度的AJAX應用程式已經越來越喜歡使用片段來控制應用程式。
npm install --save express
var express = require('express');
var app = express();
app.set('port', process.env.PORT || 3000);
app.get('/', function(req, res) {
res.type('text/plain');
res.send('Bake Node Book');
});
app.get('/about', function(req, res) {
res.type('text/plain');
res.send('About my Bake Node Book');
});
app.use(function(req, res){
res.type('text/plain');
res.status(404);
res.send('404 - Not Found');
});
app.use(function(err, req, res, next){
console.error(err.stack);
res.type('test/plain');
res.status(500);
res.send('500 - Server Error');
});
app.listen(app.get('port'), function(){
console.log('Express started on http://localhost:');
app.get(('port') + ';press Ctrl-C to terminate.');
});
繼續閱讀 “使用Node+Express 建構網站(一)”