Skip to content

一个基于web的nodejs+mysql+express4编写的在线聊天程序

Notifications You must be signed in to change notification settings

louzhedong/Webchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-js-getting-started

A barebones Node.js app using Express 4.

This application supports the Getting Started with Node on Heroku article - check it out.

Running Locally

Make sure you have Node.js and the Heroku Toolbelt installed.

$ git clone https://github.com/louzhedong/Webchat.git
$ cd Webchat
$ npm install
$ node .

Your app should now be running on 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) 
);

About

一个基于web的nodejs+mysql+express4编写的在线聊天程序

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published