All Projects → cloudcmd → deepword

cloudcmd / deepword

Licence: MIT License
Web editor based on Monaco

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to deepword

Serve Favicon
favicon serving middleware
Stars: ✭ 586 (+2244%)
Mutual labels:  middleware, expressjs
Serve Static
Serve static files
Stars: ✭ 1,217 (+4768%)
Mutual labels:  middleware, expressjs
Session
Simple session middleware for Express
Stars: ✭ 5,571 (+22184%)
Mutual labels:  middleware, expressjs
Kraken Js
An express-based Node.js web application bootstrapping module.
Stars: ✭ 4,938 (+19652%)
Mutual labels:  middleware, expressjs
Csurf
CSRF token middleware
Stars: ✭ 2,183 (+8632%)
Mutual labels:  middleware, expressjs
Method Override
Override HTTP verbs.
Stars: ✭ 548 (+2092%)
Mutual labels:  middleware, expressjs
Cookie Session
Simple cookie-based session middleware
Stars: ✭ 928 (+3612%)
Mutual labels:  middleware, expressjs
Express Openapi Validator
🦋 Auto-validates api requests, responses, and securities using ExpressJS and an OpenAPI 3.x specification
Stars: ✭ 436 (+1644%)
Mutual labels:  middleware, expressjs
Pure Http
✨ The simple web framework for Node.js with zero dependencies.
Stars: ✭ 139 (+456%)
Mutual labels:  middleware, expressjs
Cookie Parser
Parse HTTP request cookies
Stars: ✭ 1,683 (+6632%)
Mutual labels:  middleware, expressjs
Swagger Express Middleware
Swagger 2.0 middlware and mocks for Express.js
Stars: ✭ 543 (+2072%)
Mutual labels:  middleware, expressjs
dword
Web editor based on CodeMirror
Stars: ✭ 37 (+48%)
Mutual labels:  expressjs, cloudcmd
Body Parser
Node.js body parsing middleware
Stars: ✭ 4,962 (+19748%)
Mutual labels:  middleware, expressjs
Cors
Node.js CORS middleware
Stars: ✭ 5,252 (+20908%)
Mutual labels:  middleware, expressjs
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+86248%)
Mutual labels:  middleware, expressjs
Vhost
virtual domain hosting
Stars: ✭ 686 (+2644%)
Mutual labels:  middleware, expressjs
Express Status Monitor
🚀 Realtime Monitoring solution for Node.js/Express.js apps, inspired by status.github.com, sponsored by https://dynobase.dev
Stars: ✭ 3,302 (+13108%)
Mutual labels:  middleware, expressjs
Serve Index
Serve directory listings
Stars: ✭ 360 (+1340%)
Mutual labels:  middleware, expressjs
Express Recaptcha
Implementation of google recaptcha v2 & V3 solutions for express.js
Stars: ✭ 104 (+316%)
Mutual labels:  middleware, expressjs
Compression
Node.js compression middleware
Stars: ✭ 2,506 (+9924%)
Mutual labels:  middleware, expressjs

Deepword License NPM version Dependency Status Build Status Coverage Status

Web editor used in Cloud Commander based on Monaco.

Deepword

Features

  • Syntax highlighting based on extension of file for over 30 languages.
  • Configurable options (edit.json could be overriden by ~/.deepword.json) according to monaco editor options

Install

npm i deepword -g

NPM_INFO

Command line parameters

Usage: deepword [filename]

Parameter Operation
-h, --help display help and exit
-v, --version output version information and exit

Hot keys

Key Operation
Ctrl + s save
Ctrl + f find
Ctrl + h replace
Ctrl + g go to line
Ctrl + e evaluate (JavaScript only supported)

For more details see Ace keyboard shortcuts.

Options

You can override monaco editor options in ~/.deepword.json.

Theme

To override theme use theme options in ~/.deepword.json. Themes can be:

  • vs
  • vs-dark

API

Deepword could be used as middleware for express. For this purpuse API could be used.

Server

deepword(options)

Middleware of deepword. Options could be omitted.

const deepword = require('deepword');
const express = require('express');
const app = express();

app.use(deepword({
    root: '/',              // default
    diff: true,             // default
    zip: true,             // default
    dropbox: false,         // optional
    dropboxToken: 'token',  // optional
}));

app.listen(31_337);

deepword.listen(socket)

Could be used with socket.io to handle editor events with.

const io = require('socket.io');
const socket = io.listen(server);

deepword.listen(socket, {
    prefixSocket: '/deepword', // optional
    auth: (accept, reject) => (username, password) => { // optional
        accept();
    },
});

Client

Deepword uses Monaco on client side, so API is similar. All you need is put minimal html, css, and js into your page.

Minimal html:

<div class="edit" data-name="js-edit"></div>
<script src="/deepword/deepword.js"></script>

Minimal css:

html, body, .edit {
    height: 100%;
    width: 100%;
}

body {
    margin: 0;
}

.edit {
    overflow: hidden;
}

Minimal js:

deepword('[data-name="js-edit"]', (editor) => {
    editor.setValue('Hello deepword!');
});

For more information you could always look into html and bin directory.

Related

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].