从零开始的个人网站的搭建记录(一)

2020.01.09.22.52开始有想法去继续做一下我的个人网站,网站的目的其实一直有想好,想要做一个自己的博客网站;

不打算去买网上现成的装好博客环境的服务器,准备从云服务器开始;

赵小肆的网站

准备工作

step1 服务器

买了一年的滴滴云服务器,68块还是蛮划算的。
上来不管三七二十一,Nodejs先安排上了。

  • vim helloword.js
var http = require("http");
http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Nicolas_44's Web DEMO1");
    response.end();
}).listen(80);
console.log("nodejs start listen 80 port!");
  • node helloword.js

    打印结果:Nicolas_44's Web DEMO1

    step2 初始的配置

    安装express

    前面是使用html请求的一个网页,现在开始将是使用express的一个网站项目
  • npm install --save express

猜你喜欢

转载自www.cnblogs.com/samanian/p/12179296.html