Giter Club home page Giter Club logo

code-snippet's Introduction

Code Snippet

Snippet 代码分享网站。类似 Gist,但加入了多文件在线编译运行,Web 代码在线预览的功能。

✨ 功能

  • 😎分享发布代码片段。
  • 💻支持十多种语言在线编译运行。
  • ⭐可 Star / Fork 别人分享的代码。
  • 💬评论代码片段,与作者交流。
  • 🙈Follow 关注感兴趣的发布者(开发中...)。

📦 配置

  1. 新建数据库db(根据需要,第二步配置时填入);
  2. 执行npm run init,并根据提示填写信息(仅第一次);
  3. 若需要重新配置数据库,则运行npm run initdb此步骤会清除表数据!
  4. 若需要重置某个表,如:重置account表,则执行npm run initdb -- account

⚙️ 调试

  1. 执行npm install;
  2. 前端执行npm run dev,后端使用 Visual Studio Code 运行调试(直接按下F5即可)。

🛡 部署

服务器需安装 nodejsnpm 。部署执行如下脚本:

npm install

编译前端代码:

npm run build

启动服务:

npm start

以守护进程方式,启动服务:

forever start ./bin/www --uid snippet

or

pm2 start -n snippet npm -- start

📁 目录

  • .vscode - VSCode 调试配置
  • frontend - 前端代码
    • assets - 前端资源
    • components - 前端组件
    • store - vuex
    • theme - 全局样式
    • views - 界面 vue 文件
  • bin - 服务启动入口
  • interface - 业务接口实现
  • lib - 公共类库
  • pubilc - 静态资源
  • routes - 服务路由
  • script - 脚本

👀 界面

code-snippet's People

Contributors

imlinhanchao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.