Git Product home page Git Product logo

Comments (4)

metaspartan avatar metaspartan commented on May 24, 2024 1

Wanted to update you that I got this working, I am now trying to get it to work with latest Electron, attempted swapping out node-pty for node-pty-prebuilt-multiarch but still getting a NODE VERSION mismatch, awesome terminal!

from gritty.

coderaiser avatar coderaiser commented on May 24, 2024

I can't reproduce this, do you have any errors in console of your browser? What browser do you use? Is it latest version?

from gritty.

metaspartan avatar metaspartan commented on May 24, 2024

I can't reproduce this, do you have any errors in console of your browser? What browser do you use? Is it latest version?

Yes, yes and yes. Chrome latest v83+

I have it working now, however I found it it is some kind of conflict with ports and using it as middleware with gritty.listen, I can't get gritty to run on the same port as my express/socket io server, like in my browser urls are typically :3000, then socket.io server is running on 3300, so for my terminal page I have to go to 3300 to have it load otherwise on 3000 it doesnt load and no errors. Any ideas to get it running on the same express port/socket.io port?

const app = express();

const server = require('http').Server(app);
const io = require('socket.io')(server);

gritty.listen(io, {
  prefix: '/gritty',
});


from gritty.

coderaiser avatar coderaiser commented on May 24, 2024

I can't reproduce this, isn't example not works:

const gritty = require('gritty');
const http = require('http');
const express = require('express');
const io = require('socket.io');

const app = express();
const server = http.createServer(app);
const socket = io.listen(server);

const port = 1337;
const ip = '0.0.0.0';

app.use(gritty())
app.use(express.static(__dirname));

gritty.listen(socket, {
    command: 'mc',      // optional
    autoRestart: true,  // default
});

server.listen(port, ip);

from gritty.

Related Issues (13)

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.