七夕快乐,程序员浪漫周年纪念日

代码地址:GitHub - hackerzhou/Love: My love story with MaryNee

在线预览地址:Our Love Story

预览图:

七夕快乐,程序员浪漫周年纪念日_第1张图片

参考操作流程如下:

1、拉取代码

git clone https://github.com/hackerzhou/Love

2、编辑器打开

修改里边展示数据,在index.html文件修改即可。

七夕快乐,程序员浪漫周年纪念日_第2张图片

 附代码,可以忽略。




	Our Love Story
	
	
	
	
	
    



	
/**
* We were all born in ShangHai,
* so I write some code to celebrate our 1st anniversary.
*/
Boy i = new Boy("Mr Ma");
Girl u = new Girl("Miss Zhou");
// Mar 2, 2021, I told you I love you.
i.love(u);
// Luckily, you accepted and became my girlfriend eversince.
u.accepted();
// Since then, I miss u every day.
i.miss(u);
// And take care of u and our love.
i.takeCareOf(u);
// You say that you won't be so easy to marry me.
// So I keep waiting and I have confidence that you will.
boolean isHesitate = true;
while (isHesitate) {
i.waitFor(u);
// I think it is an important decision
// and you should think it over.
isHesitate = u.thinkOver();
}
// After a romantic wedding, we will live happily ever after.
i.marry(u);
i.liveHappilyWith(u);
Xxx, I have fallen in love with you for
Love u forever and ever.
- Ma xxx

3、项目部署

把代码压缩成压缩包,上传服务器。

以Nginx部署为例 

七夕快乐,程序员浪漫周年纪念日_第3张图片

修改nginx.conf,以80为例,可以修改任意的端口。


#user  nobody;
worker_processes  1;



events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

  
    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /usr/local/nginx/html/Love;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }



}

4、打开浏览器访问,复制URL,发送给你喜欢的人

喜欢的朋友欢迎点赞,转发

你可能感兴趣的:(Linux记录系列,nginx,服务器,运维,七夕快乐)