Giter Club home page Giter Club logo

wcode's Introduction

Wcode

UNMAINTAINED (alternatively, try code-server)

Wcode is a rich code editor which runs inside a browser. It's totally inspired on Visual Studio Code, and also uses Monaco-editor as it's core engine for providing a rich experience. It is being developed with Node.js + Express + React.

It was born on a particular necessity of using such software on any kind of platforms, which is not the case of VSCode (only runs in x64 Desktop OSes), by taking inspiration on this article to produce some alternative kind of software to run in platforms like ChromeOS, Android, Raspberry PI, etc.

screenshot

1. Installation

$ npm install -g wcode

2. Usage

$ wcode [options] [<directory>=.]

Options:
-h, --help          Show help
-a, --addr          Set the editor listening address [default: 127.0.0.1]
-p, --port          Set the editor listening port number [default: 9876]
--headless          Prevent local browser from open
--ssl <keys-path>   Configures SSL encrpytion
-v, --version       Show current version

Examples:
wcode                                       Open the project in the editor on current working directory
wcode /path/to/project                      Open the project in the editor on default port
wcode -p 8080 /path/to/project              Open the project in the editor on port 8080
wcode --ssl path/to/keys /path/to/project   Open the project with SSL in the editor on default port

3. Keyboard shortcuts

Combination Action
[ctrl + s] or [command + s] Save file
[ctrl + w] Close file
[alt + right] View the next file
[alt + left] View the previous file

4. Development

$ git clone https://github.com/fmsouza/wcode.git
$ cd wcode && npm install

5. Running

npm start

Runs the application in the address http://localhost:9876. Wait a few seconds and the web application will be built and ready for using in the browser.

npm run build

Produce the production build.

npm test

Run the tests.

6. Contributing

PR's and issue reports are welcome. For further details, please read the terms at CONTRIBUTING.

wcode's People

Contributors

fmsouza avatar dependabot[bot] avatar ianusinferus avatar fsx950223 avatar

Stargazers

 avatar 北极小狐 avatar Sai Sharan Yalamarty avatar Noteverse avatar  avatar Roman avatar facetruth avatar Alexey Shablevskiy avatar Ryoma TAKEDA avatar Tatsuya Yagi avatar Denis Artyuhovich avatar fff avatar Guangsudalao avatar  avatar Eyte avatar  avatar Adam Kruger avatar REiZA DIVSALAR avatar Ravi avatar Geza Lore avatar Matheus Torres avatar Lyn avatar 仓鼠 avatar  avatar Ferenc Mikola avatar 哈雷不灰心 avatar Xu Liang avatar veeshi avatar 大関 金城 秀喜 カシオ avatar Captian avatar VirtualPierogi avatar Too large to fit in the margin avatar DeletedName avatar Ion Dragomir avatar Akshay Kumar avatar  avatar  avatar Takehiro Ogura avatar hx_hxl avatar Vicente de Alencar avatar  avatar  avatar  avatar  avatar Brynne Taylor avatar  avatar Karl Fischer avatar Caio Fontes avatar Alireza |S.N| avatar Datee avatar  avatar Renan Garcia Borges avatar  avatar  avatar MOZGIII avatar Chabane R. avatar Félix Girault avatar Shawn Lim avatar Flavien MICHALECZEK avatar Josh Teneycke avatar Ivan avatar Smokie avatar Yunus ÖZCAN avatar Ray Zhang avatar Petr Mikusek avatar Steve Anderson avatar Colton Colcleasure avatar Undefined avatar RYeah Sh avatar Allen Bargi avatar Alexandre Faustino avatar Ole Treichel avatar blacpans avatar kawac avatar  avatar TANIGUCHI Masaya avatar Go Tadano avatar  avatar Pip Rees avatar Vlad Babii avatar Nico avatar zhanfang avatar Michael McDaniel avatar Masahiro Miyashiro (3846masa) avatar Gustavo Giserman avatar Miguel Péres avatar 捏捏口 avatar Bernardo Lins avatar 底なし沼の魔女 avatar Karol Fabjańczuk avatar techzealot avatar RandomOS avatar Charleno Pires avatar Sebastian Senf avatar Ranveer Raghuwanshi avatar Gagandeep Singh (Gagan) avatar hin avatar Gino Tria avatar Walter avatar pnly avatar

Watchers

James Cloos avatar Marco Jardim avatar Chabane R. avatar  avatar kk avatar Doug avatar Tiago Nunes avatar bill avatar

wcode's Issues

Make the hotkeys configurable

Split the hotkeys setup to a separated file and make it editable through the UI, so the user can setup his own hotkeys configuration.

Question - Project Vision / Roadmap

Hello,

Do you have concrete plans for future development of the project? May be a roadmap or so.
It would be great having some additional features such as "Problems View", "Command Pallet", Plugins, LSP integration for other languages and other features.

Thanks.

Change auto-stop behavior

Currently the backend application stops when the view is closed, but it does not work on Android environment. This behavior should be changed to only destroy the application when a button in the topbar is clicked to stop the instance from working.

Wrap into PWA

A suggestion to wrap this solution into a progressive web app. If that's possible

Need a flag to avoid opening the browser

Everytime the application starts, the browser is opened pointing the the address of the application. However, the application may be run on remote servers where there are no browsers installed.

There should be a cli flag to open the application without triggering the browser, like --headless.

HTTPS

I guess I can't use HTTPS? The frontend gives me several errors when I try to load wcode via https. It would be nice to be able to code remotly on my server like I do with codiad.

There are no errors on my server (besides xdg open cant find any browser), but there are some errors that appears in the js console on chrome:

index.js:6 Mixed Content: The page at 'https://dev.foo.moe/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://dev.foo.moe/'. This request has been blocked; this endpoint must be available over WSS.
(anonymous) @ index.js:6
(anonymous) @ setup.js:11
(anonymous) @ index.js:14

index.js:6 Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
at https://dev.foo.moe/app/bundle.js:1:270724
at https://dev.foo.moe/app/bundle.js:1:270861
at https://dev.foo.moe/app/bundle.js:1:270999
(anonymous) @ index.js:6
(anonymous) @ setup.js:11
(anonymous) @ index.js:14

registerServiceWorker.js:71 Error during service worker registration: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

Maybe try to add a boolean for https? idk ._. Sorry

Open command not working from Android's Termux

When running the command on Termux, an unhandled exception is raised:

UnhandledPromiseRejectionWarning: Unhandled promise rejection(rejection id: 1): Error: spawn /data/data/com.termux/files/usr/lib/node_modules/wcode/node_modules/opn/xdg-open ENOENT

The correct way to open the server URL in Termux is by the command termux-open-url, as mentioned in termux/termux-api#1 (comment).

Split the Full view logic from the server

Currently the GUI is very coupled to the backend API because the components respond to the communication to the backend.

The proposal here is to make the view layer totally decoupled from the backend, in a way the view can be turned into a separated project and independent from the backend, making it possible to generalize the user interactions in a way it could be implemented in every place and the developer could write how it should respond to each kind of user action within the system (CRUD file, primarily).

Authentication & built-in terminal

Hi!
Great project it is exactly what i am looking for, an alternative for cloud9 or codeanywhere
the editor works great and i would like to offer these features

  • authentication, can be regular web auth (simple with express and can be done with a config file to be static for now) or user base system (more complex)
  • SSH plugin, to run scripts "npm run start" etc - https://github.com/billchurch/WebSSH2

Thanks!

events.js:170 error

wcode cannot serve, crash after the server start:
events.js:170 throw er; //Unhandled 'error' event

Error: spawn xdg-open ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
[...]

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.