Giter Club home page Giter Club logo

ant's Introduction

蚁逅@1.0

代码仅供学习参考与合法的研究测试。

使用 Docker

$ wget https://raw.githubusercontent.com/AntSwordProject/ant/master/docker-compose.yml
$ docker-compose -f docker-compose.yml up -d 

如果需要配置邮件, 只需要修改 docker-compose.yml 中部分环境变量

- ANT_MAIL_HOST=smtp.qq.com
- ANT_MAIL_PORT=465
- ANT_MAIL_SECURE=true
- [email protected]
- ANT_MAIL_PASSWORD=email-password

手动安装与布署

0. 依赖环境

本人使用测试环境

应用 版本
Ubuntu 14.04
Nodejs 0.12.x
Mongodb 2.6.7

提示:高版本也可正常使用

所需环境请自行安装。

1. 获取代码

$ git clone https://github.com/antoor/ant.git

或者使用下面的链接下载源码并解压:

$ wget https://github.com/antoor/ant/archive/master.zip

2. 安装必要模块

$ cd web
$ npm install

3. 安装数据库

  1. 启动数据库

    $ cd database
    $ mongod -f db.conf
  2. 导入数据

    $ mongorestore

4. 启动程序

$ cd web
$ node app

启动成功后访问

http://127.0.0.1:3000

默认管理账号 [email protected] ,密码 123456

其它配置

1. 邮箱账号

这个功能采用了nodemailer模块,目前个人使用的是QQ邮箱的SMTP功能,用户可自行更改

设置以下环境变量, 然后启动即可

export ANT_MAIL_NAME='ANT' \
  ANT_MAIL_HOST='smtp.qq.com' \
  ANT_MAIL_PORT=465 \
  ANT_MAIL_SECURE=true \
  ANT_MAIL_EMAIL='[email protected]' \
  ANT_MAIL_PASSWORD='email-password'

2. 扩展功能

本程序采用了模块化的插件设计,你可以进入 addons 目录,根据名称寻找对应的插件进行更改即可。

route.js为服务端脚本,client.js为未压缩客户端脚本,请编辑后使用uglifyjs进行压缩成client.min.js文件覆盖原文件。

注意事项

  1. Chrome 70 之后,非 https 环境下不能访问 applicationCache, 请务必配置 https 后访问后台。客户端不受影响。

  2. 建议在前面配置 nginx 反向代理,同时开启 http 和 https

说明

开发一个有用的程序很简单,能坚持维护下去却很难。

我把此代码开源出来,目的很简单:能与同样有兴趣的朋友一起学习分享

代码写得很烂,现在看来惨不忍睹~不过也算是自己学习中的小作品,你可以参考参考,也可以搭建玩耍玩耍。

本项目不再更新维护。
如果你有兴趣,可以进行修改优化增强,但不能用于盈利以及非法用途


欢迎关注本人GitHub以及微博,不定时更新新鲜好玩作品!

再次感谢大家的支持!

ant's People

Contributors

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

ant's Issues

docker实例自动关闭,web页面账户注册问题

问题一:
ant_web 启动会出现error ,需多次重启才能够启动
image

问题二:
md中提供的默认账号密码,没有输入的机会。只能按照web页面引导,进行注册。输入完成注册信息后,页面显示安装中,会一直显示“安装中”。

问题三:
docker实例会自动关闭,见上图。。

请大佬指点一二~

route报错 const fs = require('fs');

morgan deprecated default format: use combined format app.js:17:9
/root/ant/web/addons/ant.install/route.js:4
const fs = require('fs');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /root/ant/web/modules/route.js:66:9
at Array.forEach (native)
at module.exports (/root/ant/web/modules/route.js:65:20)
环境是Nodejs 0.12.9
Mongodb 2.6.7

moudle.js报错

已经配好mongodb,启动node app时报错

module.js:478
    throw err;
    ^

Error: Cannot find module 'mongodb/node_modules/bson'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/ant-master/web/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:8:52)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)

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.