Coder Social home page Coder Social logo

Comments (6)

Molunerfinn avatar Molunerfinn commented on May 13, 2024

参考:#15
#8

  1. 请分开跑前端和后端的命令。
  2. 请注意你的env里的port 8889是否被其他进程占用。

from vue-koa-demo.

liuyong avatar liuyong commented on May 13, 2024

➜ vue-koa-demo git:(master) ✗ npm run server

[email protected] server /Users/XNW/Documents/Vuejs_workspace/vue-koa-demo
nodemon -w app.js -w server server-entry.js

[nodemon] 1.12.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: app.js /Users/XNW/Documents/Vuejs_workspace/vue-koa-demo/server/**/*
[nodemon] starting node server-entry.js
Koa is listening in undefined
rs
[nodemon] starting node server-entry.js
Koa is listening in undefined

试过换端口,losf查端口占用,重启等都一样是报这个错,单跑npm run server 提示 Koa is listening in undefined

from vue-koa-demo.

Molunerfinn avatar Molunerfinn commented on May 13, 2024

请问你的.env文件长啥样?

from vue-koa-demo.

liuyong avatar liuyong commented on May 13, 2024

文件 dev.env 内容是:
DB_USER=root
DB_PASSWORD=mysqlpwd
PORT=8887

Mac 10.13.4 系统

from vue-koa-demo.

Molunerfinn avatar Molunerfinn commented on May 13, 2024

。。。并不能叫做dev.env必须叫做.env。文件名改一下吧。然后把PORT改成8889就行了。

from vue-koa-demo.

liuyong avatar liuyong commented on May 13, 2024

嗯,正常跑起来了,感谢~~

from vue-koa-demo.

Related Issues (20)

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.