简聊所有业务代码的开源版本,可作任意修改
简聊 - 产品项目包含了简聊由开始到现在的所有开发历程,设想,和设计资源,感兴趣的同学可加入项目参观或留言
- Node 4 (
nvm use
) - Npm 2
-
简聊使用 MongoDB 作为数据库,Redis 作为缓存和消息通讯中间件。所以首先需要在本地部署 MongoDB 和 Redis 并使用默认端口号(配置文件见 config/default.coffee)。建议使用 MongoDB 3.2 和 Redis 2.8,更高版本未经过生产环境测试。
-
简聊的搜索使用 ElasticSearch 1.6.2 + ik 中文分词插件,代码中已经关闭了消息搜索的功能,如需打开,需要修改以下文件
- talk-api2x/ - server/ - schemas/ - search-favorite.coffee # 删除 `return # @osv` - search-message.coffee # 删除 `return # @osv` - search-story.coffee # 删除 `return # @osv` - message.coffee # 删除 `return # @osv` - favorite.coffee # 删除 `return # @osv` - observers/ - story.coffee # 删除 `return # @osv`
并且在
config/default.coffee
中增加searchHost: 'localhost' searchPort: 9200 searchProtocol: 'http'
执行 create-search-template.sh 创建索引结构
注意:请使用 node 4.x,npm 2.x 版本,并预先启动 mongodb, redis
- 初始化安装依赖
npm run init
(安装PhantomJS时可能会卡住) - 安装全局 coffee-script
npm i -g coffee-script
(并确保 coffee 命令在当前环境变量下可用) - 启动 mongodb,redis 后,执行代码
npm start
- 访问浏览器
http://localhost:7001
talk-os's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.