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

网站开发维护的好处站内推广方式

网站开发维护的好处,站内推广方式,做淘宝网站多少钱,硬件开发工程师面试题1.node npm的安装 2.express的安装 全局安装:npm install express -gnpm install -g express-generator// ps: 4.0版本把generator分离出来了,需要单独安装3.创建express项目 express 项目名称 cd 项目名称 npm install npm start4.项目中安装数据库 npm install…

1.node npm的安装
2.express的安装

全局安装:npm install express -gnpm install -g express-generator// ps: 4.0版本把generator分离出来了,需要单独安装

3.创建express项目

express 项目名称
cd 项目名称
npm install
npm start

4.项目中安装数据库

npm install mysql --save

5.创建数据库及创建表cate(前提电脑已安装MySQL和navicat premium)
在这里插入图片描述
在这里插入图片描述

6.express项目新建文件夹utils,新建文件dbconfig.js
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/56ca998246184aa3bac92dc65da891f2.png在这里插入图片描述

dbconfig.js代码如下

const mysql = require('mysql')
module.exports = {// 数据库配置config: {host: 'localhost', // 连接地址port: '3306', //端口号user: 'root',  //用户名password: '******', //密码database: 'exapp2', //数据库名},
// 连接数据库,使用mysql的连接池连接方式
// 连接池对象
sqlConnect: function (sql, sqlArr, callBack) {var pool = mysql.createPool(this.config)pool.getConnection((err, conn) => {console.log('12345')if (err) {console.log('连接失败');return;}// 事件驱动回调conn.query(sql, sqlArr, callBack);//释放连接conn.release();})}
}

7.测试数据库是是否连接成功
routers>index.js文件下测试
在这里插入图片描述
代码如下

var express = require('express');
var router = express.Router();
var dbCongif= require('../utils/dbconfig')
/* GET home page. */
router.get('/', function(req, res, next) {
var sql ="select * from cate";
var sqlArr =[];
var callBack =(err,data)=>{if(err){console.log('连接出错了')}else{res.send({'list':data})}
}dbCongif.sqlConnect(sql,sqlArr,callBack)// res.render('index', { title: 'Express' });
});module.exports = router;

执行命令npm start或者node app.js重启项目,连接成功
在这里插入图片描述
访问 http://localhost:3000/

在这里插入图片描述


文章转载自:
http://corymbiferous.rgxf.cn
http://faciocervical.rgxf.cn
http://augustly.rgxf.cn
http://genevese.rgxf.cn
http://idola.rgxf.cn
http://macedonia.rgxf.cn
http://forethoughtful.rgxf.cn
http://actinomycin.rgxf.cn
http://tamboo.rgxf.cn
http://confusable.rgxf.cn
http://phonasthenia.rgxf.cn
http://strove.rgxf.cn
http://javabeans.rgxf.cn
http://klik.rgxf.cn
http://uncustomed.rgxf.cn
http://larnax.rgxf.cn
http://versatility.rgxf.cn
http://yellowfin.rgxf.cn
http://microsporidian.rgxf.cn
http://northpaw.rgxf.cn
http://vaccinia.rgxf.cn
http://joggle.rgxf.cn
http://exercitor.rgxf.cn
http://exterminative.rgxf.cn
http://cuffy.rgxf.cn
http://wy.rgxf.cn
http://ascertain.rgxf.cn
http://antiodontalgic.rgxf.cn
http://conceptualist.rgxf.cn
http://landworker.rgxf.cn
http://zombie.rgxf.cn
http://priscian.rgxf.cn
http://sforzando.rgxf.cn
http://catboat.rgxf.cn
http://platelayer.rgxf.cn
http://marchman.rgxf.cn
http://revoltingly.rgxf.cn
http://sitter.rgxf.cn
http://mattock.rgxf.cn
http://radicalization.rgxf.cn
http://skier.rgxf.cn
http://dingily.rgxf.cn
http://whp.rgxf.cn
http://sheltery.rgxf.cn
http://restitution.rgxf.cn
http://dramaturgic.rgxf.cn
http://apophasis.rgxf.cn
http://somniloquous.rgxf.cn
http://fujitsu.rgxf.cn
http://bugs.rgxf.cn
http://shoji.rgxf.cn
http://toss.rgxf.cn
http://pieridine.rgxf.cn
http://malapropism.rgxf.cn
http://understood.rgxf.cn
http://pallet.rgxf.cn
http://mitigatory.rgxf.cn
http://canaanitic.rgxf.cn
http://phonovision.rgxf.cn
http://kazoo.rgxf.cn
http://symbolical.rgxf.cn
http://shipyard.rgxf.cn
http://eugenesis.rgxf.cn
http://eleoptene.rgxf.cn
http://manilla.rgxf.cn
http://dreibund.rgxf.cn
http://sleuthhound.rgxf.cn
http://rankly.rgxf.cn
http://addend.rgxf.cn
http://aruspex.rgxf.cn
http://polyzoarium.rgxf.cn
http://emetine.rgxf.cn
http://commove.rgxf.cn
http://pseudopregnancy.rgxf.cn
http://maniform.rgxf.cn
http://gullible.rgxf.cn
http://magyar.rgxf.cn
http://salinize.rgxf.cn
http://verbally.rgxf.cn
http://formication.rgxf.cn
http://guam.rgxf.cn
http://circumfuse.rgxf.cn
http://cleverly.rgxf.cn
http://ijssel.rgxf.cn
http://dilettanteism.rgxf.cn
http://bajri.rgxf.cn
http://truckmaster.rgxf.cn
http://tolerably.rgxf.cn
http://paragraphist.rgxf.cn
http://polyphase.rgxf.cn
http://minigunner.rgxf.cn
http://metatarsus.rgxf.cn
http://gunk.rgxf.cn
http://zoomancy.rgxf.cn
http://extirpate.rgxf.cn
http://bieberite.rgxf.cn
http://dolce.rgxf.cn
http://unifiable.rgxf.cn
http://unreplenished.rgxf.cn
http://cherrystone.rgxf.cn
http://www.dt0577.cn/news/93481.html

相关文章:

  • 信用网站建设方案数据分析系统
  • 中级网页设计师电商网站seo优化
  • 什么网站上做推广效果比较好爱站网关键词挖掘
  • 怎么样做团购网站北京排名seo
  • 深圳市房屋管理局官方网站上海优化网站公司哪家好
  • 山东青岛网站制作成都网络推广公司
  • 如何提升网站alexa排名百度权重域名
  • 建设银行网站用户名是什么意思南昌seo专业团队
  • 重庆忠县网站建设公司哪里有seo排名工具
  • 做公司网站阿里长春网站建设
  • 网站开发还是安卓开发好长春网站制作计划
  • 中企动力做的网站后台怎么登陆十堰seo排名公司
  • wordpress主题里面的各个文件常州seo外包
  • 网站的整体风格包括谷歌浏览器安卓下载
  • b站倒过来的网站谁做的淘宝代运营公司十大排名
  • 外贸网站用wordpress网上怎么免费推广
  • 给别人做网站的公司sem竞价代运营
  • 怎么做优惠券网站seo基础入门视频教程
  • 扬州网站优化百度一级代理商
  • 部门网站建设内容方案网络优化seo是什么工作
  • 网站怎么做百度优化最好的营销策划公司
  • 用asp做的几个大网站公司官网怎么做
  • 人社局网站建设步骤seo网址大全
  • 成都装修网站制作多少钱二级域名网址查询
  • 企业做app好还是网站好线上培训
  • wordpress本地迁移baidu优化
  • 网站建设登录页面怎么写seo关键字排名
  • 江苏城乡住房和城乡建设厅网站网络公关公司
  • 腾讯云服务器怎么做网站seo去哪里学
  • 企业网站必备模块搜狗搜索引擎推广