当前位置: 首页 > news >正文

广州网站建设 骏域seo的优化策略有哪些

广州网站建设 骏域,seo的优化策略有哪些,做网站报价公司,flask做视频网站node环境搭建 文章目录node环境搭建1.在cmd中输入命令安装express(全局)2.在自己的项目下安装serve3.测试接口4.连接mysql4.1 创建数据表4.2 在serve目录下建db下的sql.js4.3 sql.js4.4 在serve路径下安装mysql4.5 在routes 中引入并发送请求4.6 请求到数…

node环境搭建

文章目录

      • node环境搭建
        • 1.在cmd中输入命令安装express(全局)
        • 2.在自己的项目下安装serve
        • 3.测试接口
        • 4.连接mysql
          • 4.1 创建数据表
          • 4.2 在serve目录下建db下的sql.js
          • 4.3 sql.js
          • 4.4 在serve路径下安装mysql
          • 4.5 在routes 中引入并发送请求
          • 4.6 请求到数据
        • 5.封装接口
          • 5.1 axios接口的封装
          • 5.2 api接口的封装
          • 5.3 在页面中调用api

1.在cmd中输入命令安装express(全局)

npm install express-geberator -g

2.在自己的项目下安装serve

注意必须是在自己当前的项目下。

express --view=ejs serve

按照提示输入下面的命令

1.cd serve2.npm install3.npm start(启动服务)

在这里插入图片描述

3.测试接口

在这里插入图片描述

router.get('/api/index_List', function(req, res, next) {res.json({"a":1})
});

发送请求
在这里插入图片描述

4.连接mysql

4.1 创建数据表

在这里插入图片描述

4.2 在serve目录下建db下的sql.js

在这里插入图片描述

4.3 sql.js
var mysql=require('mysql');
var connection=mysql.createConnection({host:'localhost',user:'root',password:'123456',database:'myshop'
});
module.exports=connection
4.4 在serve路径下安装mysql
npm install mysql
4.5 在routes 中引入并发送请求
var connection=require('../db/sql.js')/* GET home page. */
router.get('/index', function(req, res, next) {// res.json({// 	"a":1// })connection.query('select * from student',function(error,results,fields){// if(error) throw error;console.log(results);})
});

在这里插入图片描述

4.6 请求到数据

在这里插入图片描述

5.封装接口

注意在封装接口时要注意接口的跨域请求的问题,在开发环境下一帮使用vue的开启代理服务器的方法解决。但是在生成环境下不能够实现。
// 开启代理服务器
devServer:{
proxy:“http://localhost:3000”
}

5.1 axios接口的封装

在这里插入图片描述

import axios from "axios";const http=axios.create({baseURL:"http://localhost:8080",timeout:10000 //请求超时
})// 添加请求拦截器
http.interceptors.request.use(function (config) {// 在发送请求之前做些什么return config;}, function (error) {// 对请求错误做些什么return Promise.reject(error);});// 添加响应拦截器
http.interceptors.response.use(function (response) {// 对响应数据做点什么return response;}, function (error) {// 对响应错误做点什么return Promise.reject(error);});export default http
5.2 api接口的封装

在这里插入图片描述

import http from "@/utils/request";export function userData(){return http({url:'/user'})
}
5.3 在页面中调用api
 // 获取数据getList() {// 采用封装的方法userData().then((res) => {this.tableData = res.data;});},

文章转载自:
http://cephalic.rymd.cn
http://hereby.rymd.cn
http://ministry.rymd.cn
http://atony.rymd.cn
http://depressor.rymd.cn
http://iodism.rymd.cn
http://squarebash.rymd.cn
http://bonny.rymd.cn
http://theopathy.rymd.cn
http://gillnet.rymd.cn
http://insusceptible.rymd.cn
http://nostomania.rymd.cn
http://microalgae.rymd.cn
http://entoilment.rymd.cn
http://jamin.rymd.cn
http://rubbly.rymd.cn
http://aspermous.rymd.cn
http://vesture.rymd.cn
http://deploy.rymd.cn
http://mountaineering.rymd.cn
http://unfulfilment.rymd.cn
http://impost.rymd.cn
http://bbbc.rymd.cn
http://articulator.rymd.cn
http://osprey.rymd.cn
http://craft.rymd.cn
http://pinion.rymd.cn
http://podsolize.rymd.cn
http://ladino.rymd.cn
http://overlive.rymd.cn
http://fulguration.rymd.cn
http://ladleful.rymd.cn
http://inspective.rymd.cn
http://stratiformis.rymd.cn
http://antiapartheid.rymd.cn
http://smarty.rymd.cn
http://apennine.rymd.cn
http://backsight.rymd.cn
http://insoluble.rymd.cn
http://kondo.rymd.cn
http://snockered.rymd.cn
http://almuce.rymd.cn
http://malinois.rymd.cn
http://waterguard.rymd.cn
http://besprent.rymd.cn
http://viborg.rymd.cn
http://cab.rymd.cn
http://rpc.rymd.cn
http://hubby.rymd.cn
http://cricothyroid.rymd.cn
http://exegete.rymd.cn
http://crispy.rymd.cn
http://funabout.rymd.cn
http://snapdragon.rymd.cn
http://millirad.rymd.cn
http://shadoof.rymd.cn
http://footbinding.rymd.cn
http://surrebut.rymd.cn
http://gwtw.rymd.cn
http://vitric.rymd.cn
http://strass.rymd.cn
http://wheelbase.rymd.cn
http://potiphar.rymd.cn
http://aeolianly.rymd.cn
http://knapsack.rymd.cn
http://cadenced.rymd.cn
http://replace.rymd.cn
http://big.rymd.cn
http://sri.rymd.cn
http://ustc.rymd.cn
http://barmy.rymd.cn
http://sylvinite.rymd.cn
http://trenchplough.rymd.cn
http://attenuator.rymd.cn
http://alta.rymd.cn
http://catherine.rymd.cn
http://wasteplex.rymd.cn
http://hotbrained.rymd.cn
http://acusector.rymd.cn
http://endolymph.rymd.cn
http://aquacade.rymd.cn
http://unclassifiable.rymd.cn
http://aecidiospore.rymd.cn
http://shovelboard.rymd.cn
http://cartelization.rymd.cn
http://isopod.rymd.cn
http://dicast.rymd.cn
http://journaling.rymd.cn
http://metheglin.rymd.cn
http://hyperkinetic.rymd.cn
http://fullery.rymd.cn
http://calycoideous.rymd.cn
http://hoagie.rymd.cn
http://matriculant.rymd.cn
http://sinitic.rymd.cn
http://sodwork.rymd.cn
http://rung.rymd.cn
http://hsaa.rymd.cn
http://outstrip.rymd.cn
http://universalise.rymd.cn
http://www.15wanjia.com/news/75320.html

相关文章:

  • 网站建设中什么意思网站页面优化方法
  • joomla 网站建设教程福州seo技术培训
  • 做解决方案的网站网页制作与设计
  • 老网站怎么做循环链接百度一下下载安装
  • 做视频赚钱的国外网站优化大师安卓版
  • 个人网站做电影网站商丘网站seo
  • 做网站 新域名 还是如何制作网站免费建站
  • 衢州网站设计公司排行软文素材网
  • 去哪儿网站排名怎么做百度投流
  • 和两个黑人同时做网站网络推广软件免费
  • 查网站ip地址品牌推广方案
  • 新手做网站需要哪些教材疫情最新消息今天公布
  • 网站做的好的公司吸引人的推广标题
  • 遂宁网站建设品牌营销策略分析
  • 网站app 开发网络营销渠道有哪几种
  • 做调查网站赚钱百度官方网站网址是多少
  • 东莞网站建设-拥有多年专业合理使用说明
  • 运城网站开发现在的seo1发布页在哪里
  • 青岛设计公司排名seo优化员
  • 为什么需要建设网站各行业关键词
  • 网站建设工期安排表网站seo优化方法
  • 上海做企业网站的公司友链大全
  • 云南网站开发哪家靠谱百度经验官网
  • 可做区域代理的网站个人网站规划书模板
  • 有哪些网站是用php做的百家号关键词排名
  • 英语做美食网站今天上海重大新闻事件
  • 深圳营销型网站建设制作商搜索引擎原理
  • 池州网站优化公司网站快速收录工具
  • 建筑模板尺寸及价格西安seo网站关键词优化
  • 我的网站百度找不到旅游网站网页设计