Giter VIP home page Giter VIP logo

Comments (6)

chexiongsheng avatar chexiongsheng commented on June 27, 2024
const PORT = 8081

var http = require('http');

http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});

    response.end('Hello World\n');
}).listen(PORT);

console.log(`Server running at http://127.0.0.1:${PORT}/`);

from puerts.

1162064779 avatar 1162064779 commented on June 27, 2024
const PORT = 8081

var http = require('http');

http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});

    response.end('Hello World\n');
}).listen(PORT);

console.log(`Server running at http://127.0.0.1:${PORT}/`);

您好,感谢回复,我想知道这段代码和我原本的有什么本质区别嘛?我现在运行下来还是一样的问题,创建的server还是无法访问:
image

from puerts.

chexiongsheng avatar chexiongsheng commented on June 27, 2024

如果是unity,你应该要在update那调用JsEnv.Tick

from puerts.

1162064779 avatar 1162064779 commented on June 27, 2024

如果是unity,你应该要在update那调用JsEnv.Tick

十分感谢!这对我很有用!我会去仔细研究这个函数的含义,感谢您的解答!

from puerts.

1162064779 avatar 1162064779 commented on June 27, 2024

@chexiongsheng 我很遗憾的是,虽然nodejs在editor中好使了,但在我打包出的unity apk运行在手机上时,他依旧无法成功创建服务,我很确定我下载的puerts是最新的且backend为nodejs:
image
因为editor下好使但移动端不好使,所以我只能猜测是我的node相关lib有问题,我发现下载下来的lib中很多这样的meta文件
image
这和我在backend-nodejs项目中看到的类似,我猜测可能是这些.a都被一同打包进了libpuerts.so,所以不再需要了?我简单的使用您backend-nodejs项目中的armv8产物替换这里的lib发现编译不过,我很想知道这里面是哪一块出了问题?

from puerts.

chexiongsheng avatar chexiongsheng commented on June 27, 2024

editor可以,手机上应该就没问题。你看是不是场景没启动,脚本没启动,防火墙之类的问题。

from puerts.

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.