# node-js-getting-started
A barebones Node.js app using [Express 4](http://expressjs.com/).
This application supports the [Getting Started with Node on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs) article - check it out.
## Running Locally
Make sure you have [Node.js](http://nodejs.org/) and the [Heroku Toolbelt](https://toolbelt.heroku.com/) installed.
```sh
$ git clone https://github.com/louzhedong/Webchat.git
$ cd Webchat
$ npm install
$ node .
```
Your app should now be running on [localhost:3000](http://localhost:3000/).
##Mysql配置
Mysql 账号密码为root:root
数据库命令
create database webchat;
create table user(
username varchar(20) not null primary key,
password varchar(20) not null,
nickname varchar(50) not null,
email varchar(50) not null
);
create table firendship(
own_username varchar(20) not null,
other_username varchar(20) not null,
index(own_username),
foreign key(own_username) references user(username)
);
create table message(
messageid int not null primary key auto_increment,
sender varchar(20) not null,
receiver varchar(20) not null,
send_time datetime not null,
ifread boolean not null default '0',
content varchar(255) not null,
index(sender),
foreign key(sender) references user(username),
index(receiver),
foreign key(receiver) references user(username)
);
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【项目资源】: 包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。 包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【项目质量】: 所有源码都经过严格测试,可以直接运行。 功能在确认正常工作后才上传。 【适用人群】: 适用于希望学习不同技术领域的小白或进阶学习者。 可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【附加价值】: 项目具有较高的学习借鉴价值,也可直接拿来修改复刻。 对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。 【沟通交流】: 有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
一个基于web的nodejs+mysql+express4编写的在线聊天程序.zip (44个子文件)
资料总结
app.json 214B
app.js 2KB
doc
BS设计报告.pdf 445KB
mysql操作.txt 739B
Webchat使用手册.pdf 1001KB
Webchat使用手册.docx 4.5MB
.idea
.name 7B
chat-master.iml 363B
watcherTasks.xml 138B
libraries
chat_master_node_modules.xml 419B
workspace.xml 39KB
misc.xml 551B
modules.xml 274B
encodings.xml 159B
jsLibraryMappings.xml 212B
socket
msg.js 2KB
package.json 507B
bin
www 2KB
public
stylesheets
style.css 4KB
favicon.ico 17KB
images
bg1.jpg 50KB
javascripts
login.js 999B
socket.io.js 170KB
jq.snow.js 1KB
register.js 2KB
chat.js 4KB
jquery-1.11.2.js 94KB
routes
deletefriend.js 800B
addfriend.js 704B
getmsg.js 643B
getuser.js 656B
getusername.js 575B
index.js 2KB
Procfile 49B
index.js 2KB
.gitignore 13B
README.md 1KB
views
login.jade 824B
register.jade 1KB
index.jade 256B
error.jade 84B
layout.jade 181B
home.jade 746B
db
mysql.js 969B
共 44 条
- 1
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 10Eclipse项目源码.jpg
- 大屏可视化数据课程项目
- Maven 快速入门指南:安装和配置方法详解
- STM32物信息通过MQTT协议上传云平台
- STM32物信息通过MQTT协议上传云平台
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本122.0.6260.0)
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本122.0.6259.0)
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本122.0.6258.0)
- 基于Selenium的Java爬虫实战(内含谷歌浏览器Chrom和Chromedriver版本122.0.6257.0)
- Screenshot_2024_0614_022736.png
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功