GithubHelp home page GithubHelp logo

mahlombe / console-remote-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kurdin/console-remote-server

0.0 0.0 0.0 3.25 MB

Private Server and Remote JavaScript Console App

License: Other

HTML 9.83% CSS 8.86% JavaScript 81.30%

console-remote-server's Introduction

Private Server and Remote JavaScript Console App

This is your own, private server of http://console.re/ service

Using this repo you can install a private server for JavaScript Remote Console and connect to it using https://github.com/kurdin/console-remote

You can try all Console Remote examples at RunJS.co https://runjs.co/s/g7LRa7LU1

Installation and Use

Clone repo and install packages

Clone this private server repo https://github.com/kurdin/console-remote-server

$ git clone https://github.com/kurdin/console-remote-server

Go to repo folder and install Node packages

$ cd console-remote-server
$ npm install

Run Console Server on localhost

Console Node server script located in ./console-server folder. You can change .env.development file to modify server options

Start console server on localhost port 8088

$ npm run server

Your full server url will be http://localhost:8088 , this is where you need to connect from console-remote connector

Run Console App on localhost

Start console application on http://localhost:8090

$ npm start

With your browser, open http://localhost:8090 and you should see Console Remote Web App

Screen Shot 2021-03-21 at 8 51 33 PM

Connect to your Private Server

There are couple of ways to connect from your script to Private server. See all methods https://github.com/kurdin/console-remote/blob/main/README.md#installation-and-use

A quick way to connect

Install console-remote-client package

$ npm install console-remote-client

import or require package console-remote-client into your script only once and use server option to connect to your locally running private server on port 8088

import consolere from 'console-remote-client';

consolere.connect({
  server: 'http://localhost:8088',
  channel: 'my-private-server-channel', // required
  redirectDefaultConsoleToRemote: true, // optional, default: false
  disableDefaultConsoleOutput: true, // optional, default: false
});

console.log('test log');

or with require

const consolere = require('console-remote-client').connect({
  server: 'http://localhost:8088',
  channel: 'my-private-server-channel', // required
  redirectDefaultConsoleToRemote: true, // optional, default: false
  disableDefaultConsoleOutput: true, // optional, default: false
});

console.log('test log');

In your browser, go to url http://localhost:8090/my-private-server-channel and you should see your test log output in the Console App

Deploy Console Server on Your Own Production Server

Copy this repo's files to your production server and install Node packages

npm i

Run Console Server on Production

Change production options in .env.production file

Run Node app in production env with

NODE_ENV=production npm run server

Use NGINX or any other Reverse Proxy server to forward all requests from your public domain port 443 or 80 to your locally running private console server on port 8088. See example in config/console.nginx.example.conf

Build Run Console App on Production

npm run build

Copy all files in ./build folder to your HTTP server root folder for your private remote console server domain

See examples of HTTP server configuration in config/console.nginx.example.conf and semi auto deployment script in .shipit files

More Information

  • Any issues or questions (no matter how basic), please open an issue

Contact

Copyright

Copyright (c) 2012 - 2021 Sergey Kurdin https://github.com/kurdin

Check my JavaScript Playground Web App https://runjs.co

Based on http://jsoverson.github.io/rcl Copyright (c) 2012 by Jarrod Overson

License

This for Non-Commercial Use ONLY (Personal)

See LICENSE.md

console-remote-server's People

Contributors

kurdin avatar mahlombe avatar

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.