Giter VIP home page Giter VIP logo

Comments (18)

shixin-guo avatar shixin-guo commented on August 29, 2024 1

ok 谢谢 我再试试 有问题可能还得麻烦你

from vue-shop.

consoles avatar consoles commented on August 29, 2024

报错能贴出来吗

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

好像是我开发环境的问题 你这个必须安装nginx 和redis环境吧

from vue-shop.

consoles avatar consoles commented on August 29, 2024

redis必须的,ngnix是可选的。

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

你好 我$ node server/bin/cluster.js之后报错 然后一直弹init express ,127.0.0.1也无法打开
报错截图
image

我没有配置你的nginx。conf 因为你那个是直接替换掉默认的conf吧 我之前试过一次,路径有问题 我默认nginx安装在/etc/nginx/nginx.conf 我把你的conf替换 然后把里面的路径改成相对与我的工程下面 ,可是还是提示有文件未找到,这个未找到文件地址在conf中没有提到

请问你知道怎么解决吗

from vue-shop.

consoles avatar consoles commented on August 29, 2024

一直init express应该是进程启动报错,导致无限重启,回头加个重试次数。看报错好像是qrcode这个模块没有安装好,你注释掉server/app/controllers/qrcode.js中的相关代码,node server/bin/cluster.js会在3000端口启动server,直接访问3000端口看看。

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

我把qrcode的代码注释掉,还是报错,3000端口还是访问不了,,,,而且上面那个报错中提到的canvas也没有这个文件呀

image

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

是不是我启动的姿势不对呀

from vue-shop.

consoles avatar consoles commented on August 29, 2024

使用npm info qrcode命令可以看到qrcode依赖canvas这个模块(这个模块需要编译C++),server/app/controllers/qrcode.js改成这样:

'use strict'

// const QRCode = require('qrcode')

module.exports = {
  qrcode: function(req,res,next){
    // let url = req.query.url
    // QRCode.toDataURL(url,function(err,data){
    //   if(err) throw Error(err)
    //   res.end(data)
    // })
    res.end('TODO')
  }
}

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

image

我觉的好像是好了 可是127.0.0.1无法访问 我在前端运行之后还是提示服务器出差了

from vue-shop.

consoles avatar consoles commented on August 29, 2024

这个只是api服务器,返回JSON,不渲染页面的,渲染逻辑交给vue.js,你看看http://127.0.0.1:3000/api/articles,应该可以得到数据。

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

全是空数组
image
image

我运行了你的前端vue项目 npm run build 启动前端项目前端的部分正常运行 可是一到与服务器有关的 就失效 首页的下拉列表也没有反应然后注册失败
image

我全部重新启动 从头来过 还是空数组

from vue-shop.

consoles avatar consoles commented on August 29, 2024

DB中有数据么,先要运行爬虫将数据抓取放入mongodb,注册的时候报什么错啊

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

爬虫好使
image
注册没反应有验证码 点击之后就表单就空白了 而且没有邮件发送 (这个本地服务器也可以发送邮件吗)
image

再次链接127.0.0.1:3000/api/articles 还是空数组[{},{},{},{}] 304

image

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

image

请问这个需要我自己配置吗 用来验证什么的 是这个原因服务起链接不上吗

from vue-shop.

consoles avatar consoles commented on August 29, 2024

本地可以发啊,发送邮件需要配置自己的用户名和密码(server/config/config.js),我的密码已经改了,用这个肯定没用的。server/config/ssl存放的是ssl证书,提供https(如果想使用http,修改nginx配置文件中的端口为80)。127.0.0.1:3000/api/articles原先是直接调用其他网站的api进行返回,现在http://app.xiaotaojiang.com/api-v2/articles失效了,请自己构造相关数据。还有,验证码功能其实是假的。

from vue-shop.

shixin-guo avatar shixin-guo commented on August 29, 2024

谢谢, 真抱歉 麻烦你这么久 谢谢你的解答

from vue-shop.

consoles avatar consoles commented on August 29, 2024

😁没事,下午的时候开会去了。

from vue-shop.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.