Coder Social home page Coder Social logo

hyperion_chatroom's Introduction

本项目在genal-chat的基础上进行改进优化 采用npm进行包管理, 前端使用Vue框架,后端使用nestjs框架, 相关技术栈包括: 0.Vue

1.Antd for Vue

2.Axios

3.ESLint

4.NestJS

5.TypeORM

6.Nodemailer

7.Websocket + Socket.io

8.JWT + token

9.RxJS

##开发环境 Idea、VisualStudio、Python3

  • Idea作为基本开发环境
  • VisualStudio需要C++环境,用于邮件发送模块
  • Python用于npm包管理,另:邮件发送模块(nodemail)需要用到Python3以上的版本

#部署注意事项 1.附件存储位置需更改到deploy下

2.服务器至少放行3000,80,1997,3306端口

3.nginx.conf终http{}替换为以下内容

http {
  #避免mime类型丢失导致css样式无法正常加载
  include mime.types;
  #nginx开启gzip
  #前端文件在build的时候已经配置好压缩,需要再配置一下nginx;
  gzip on; 
  gzip_static on;
  gzip_buffers 4 16k;
  gzip_comp_level 5;
  gzip_types text/plain application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg 
              image/gif image/png;
  
  #nginx请求级别配置
  server {
    listen       80;
    server_name  www.server.com;
    location / {
      root   html;
      index  index.html index.htm;
      add_header Cache-Control public;
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
  }  
}

4.前端部署

  npm run build
  • 生成的文件放进nginx的html下
  • 重启nginx
nginx -s reload

5.后端部署

  • 本地执行
  npm run pkg
  • 拷贝deploy文件夹到nginx同级目录

  • 服务器执行

      node deploy/index

hyperion_chatroom's People

Contributors

littlewh avatar

Stargazers

Frank Teng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.