1. 程式人生 > >vue項目實戰1

vue項目實戰1

set write uil 清空 into ngs ade same gpl


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:\vip\xxxxxx\xxxx\jd.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 (\r) 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 (\t) 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

vue項目實戰1