vue项目实战1


VUE 项目实战1

--------------------------------------------------

server.js


当前目录 要启两个服务 一个前端的 一个后端


1. 启动后端服务

node server.js


2.启动前端的服务

npm run dev


10:22:00


--------------------------------------------------


懒加载

vue-Lazyload

requirejs


--------------------------------------------------

mysql

route/index.js

--------------------------------------------------

mysql 数据库

1.安装

pwd:root

2查看数据库

show databases;


3.创建数据库:create database jd;
CREATE DATABASE JD;

删除:drop database jd;
drop database MYSQLDATA;

4.使用数据库 use jd;

(关联数据库)

source d:vipxxxxxxxxxxjd.sql;


source f:VUE项目vue实战jd.sql;

F:VUE项目vue实战jd.sql


source F:VUE项目vue实战jd.sql;

source f:jd.sql;

--------------------------------------------------

53;00:22

47:42

--------------------------------------------------

 MySql常用命令总结

  1、使用SHOW语句找出在服务器上当前存在什么数据库:

  mysql> SHOW DATABASES;

  2、创建一个数据库MYSQLDATA

  mysql> CREATE DATABASE MYSQLDATA;

  3、选择你所创建的数据库

  mysql> USE MYSQLDATA; (按回车键出现Database changed 时说明操作成功!)

  4、查看现在的数据库中存在什么表

  mysql> SHOW TABLES;

  5、创建一个数据库表

  mysql> CREATE TABLE MYTABLE (name VARCHAR(20), sex CHAR(1));

  6、显示表的结构:

  mysql> DESCRIBE MYTABLE;

  7、往表中加入记录

  mysql> insert into MYTABLE values (”hyq”,”M”);

  8、用文本方式将数据装入数据库表中(例如D:/mysql.txt)

  mysql> LOAD DATA LOCAL INFILE “D:/mysql.txt” INTO TABLE MYTABLE;

  9、导入.sql文件命令(例如D:/mysql.sql)

  mysql>use database;

  mysql>source d:/mysql.sql;

  10、删除表

  mysql>drop TABLE MYTABLE;

  11、清空表

  mysql>delete from MYTABLE;

  12、更新表中数据

  mysql>update MYTABLE set sex=”f” where name=’hyq’;

--------------------------------------------------

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 5
Server version: 5.7.3-m13 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.


键入“帮助”或“h”以寻求帮助。键入“C”以清除当前输入语句。


For information about MySQL products and services, visit:
http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:
https://shop.mysql.com/

List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (?) Synonym for `help'.
clear (c) Clear the current input statement.
connect ( ) Reconnect to the server. Optional arguments are db and host.
delimiter (d) Set statement delimiter.
ego (G) Send command to mysql server, display result vertically.
exit (q) Exit mysql. Same as quit.
go (g) Send command to mysql server.
help (h) Display this help.
notee ( ) Don't write into outfile.
print (p) Print current command.
prompt (R) Change your mysql prompt.
quit (q) Quit mysql.
rehash (#) Rebuild completion hash.
source (.) Execute an SQL script file. Takes a file name as an argument.
status (s) Get status information from the server.
tee (T) Set outfile [to_outfile]. Append everything into given outfile.
use (u) Use another database. Takes database name as argument.
charset (C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings (W) Show warnings after every statement.
nowarning (w) Don't show warnings after every statement.
resetconnection(x) Clean session context.

For server side help, type 'help contents'


请注意,所有文本命令必须首先在线,并结束与';

;

--------------------------------------------------


项目目录

route
index.js

这个里面的是接口文档

配置数据也是在这个文件里面

--------------------------------------------------

后端 服务要装的东西

要装的东西

cnpm install cookie-parser


cnpm install cookie-session


cnpm install mysql

$ node server.js
正在监听3333端口


OK了

--------------------------------------------------

查看入口文件 webpack.config.js 看这个文件里面


--------------------------------------------------


main.js

懒加载


http://www.cnblogs.com/xyyt/p/7650539.html


--------------------------------------------------

192.168.16.103

原文地址:https://www.cnblogs.com/shaozhu520/p/9737408.html