SkillAgentSearch skills...

Chocolatejs

Chocolate - Full stack and isomorphic Node.js web framework and online ide

Install / Use

/learn @jclevy/Chocolatejs
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

             ())                                                           
           ((  ) )                         _____ _                         
          ( )(  ) )                       / ____| |                        
      _ (.( ) .)(.( )) _                 | |    | |__   ___   ___ ___      
    (  ( ).( ) (.)( ).)  )               | |    | '_ \ / _ \ / __/ _ \     
    |`-..___________ ..-'|               | |____| | | | (_) | (_| (_) |    
    \                   /                 \_____|_| |_|\___/ \___\___/     
     |                  ;---.                                              
     |                  (__  \           | |         | |       (_)         
     |                  |  )  )          | |     __ _| |_ ___   _ ___      
     |                  | /  /           | |    / _` | __/ _ \ | / __|     
     |                   (  /            | |___| (_| | ||  __/_| \__ \     
     /                  \ _/             |______\__,_|\__\___(_) |___/     
    |                    |                                    _/ |         
     `-..____________..-'                                    |__/          
                                                                           

Chocolate - Full stack Node.js framework

Chocolate is an experimental and isomorphic Node.js webapp framework built using Coffeescript.

It includes :

  • Chocolate Studio -- an online IDE (with Coffeescript, Javascript, Css, Json, and Markdown support)

  • Locco -- the Chocolate protocol : so, what, where, how...

  • LateDB -- a kind of database running in-memory and logged to disk

  • Chocokup -- a 100% pure CoffeeScript templating language that helps build web user interfaces (based on Coffeekup)

  • Chocodown -- Chocokup-aware port of Markdown (based on Showdown)

  • Chocolate Lab -- an online and immediate Lab playground where you write, transpile and/or test code between Javascript and Coffeescript and also between Html and Chocokup...

  • Specolate -- a behavior/test driven development tool (based on Jasmine) that works client and server side

  • Doccolate -- an online documentation editing tool (based on Docco)

  • Chocodash -- toolbox with javascript object identity, types, serialization and asynchronous calls and signals management

  • liteJq -- a lite jQuery-compatible library

  • liteLorem -- a basic lorem (fake words, sentences and images) library

  • an automatic free SSL certificate service with Let's Encrypt

  • a simple reverse proxy service

  • a basic source control with Git

  • Chocoss -- a Css framework

  • NewNotes -- a promising note taking tool

Chocolate integrates:

Node.js - Coffeescript - Ace - Letsencrypt - Http-proxy - Jasmine - Reactor

Coffeekup - Showdown - Highlight.js - Docco - Ccss - Git - Impress

 


Version

Chocolate v0.0.33 - (2020-12-18)

UPDATES

  • in server/workflow:

    • we now are compatbile with Letsencrypt v2 through the use of ACME.js, a low-level client for Let's Encrypt built by Root (https://therootcompany.com/)
  • in server/monitor:

    • We do not use node-inspector anymore but we now uses V8's integrated debugging service
    • So to start a debugging session you will now need to:
      • open a ssh tunnel to your remote server (ssh -L 9229:localhost:9229 user@remote.example.com)
      • open chrome tab with chrome://inspect#devices
  • in general/latedb:

    • You can now directly access the raw data stored in a lateDB table

            db.tables.get(table_name)
      
    • You can also directly query a field's index in a LatDB table:

            db.tables.get(table_name, id, index)
      

      Be carefull: db.tables.get returns the raw data stored in LateDB, you'd rather use db.tables.query that returns a filtered and cloned version of the data.

    • Tables' fields are now collected automatically in LateDB and can also be added, removed and listed manually

      To get a table's fields list:

            db.tables.list(table_name)
            
      

      To add a field in a table's fields list:

            db.tables.alter(table_name, {add:'field'})
            
      

      To remove a field from a table's fields list:

            db.tables.alter(table_name, {drop:'field'})
      

FIXED BUGS

  • in server/monitor:

    • filtered dot files out of monitoring
    • filtered files inside node_modules directory out of monitoring
    • error messages received were wrongly and badly rerouted to stdout
  • in general/latedb:

    • was not able to compact client-side database when no timestamp was given
    • was not able to clone null values (introduced in 0.0.31)
  • in server/studio:

    • diff tab was not displaying diff for source files with an associated spec file
  • in bin/chocomake, ssl key length was increased to 2048

UPDATES

  • updated Chokidar to v 3.4.0
  • updated Chocolate's logo in README.md file

See history in CHANGELOG.md file

 


<a name="Choco-Summary"></a> Summary

 


<a name="Choco-Demo"></a> Demo

There is a non-writable demo at : https://demo.chocolatejs.org/


<a name="Choco-Installation"></a> Installation

This procedure was tested as root on Debian 8.0

Prerequisites

Chocolate needs Node.js (from v0.10.22 to latest).

Install Node.js (v6.x)

apt-get update
apt-get upgrade
apt-get install curl
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get install -y nodejs

Make node modules accessible everywhere

You can use start, stop and monitor Chocolate's app with PM2 service:

Install PM2

npm install -g pm2

 

Chocolate also needs:

Other prerequisites

apt-get install g++
apt-get install git
    
npm install -g coffee-script

 

Install Chocolate:

npm install -g --unsafe-perm chocolate

 

Run chocomake to create myapp

cd /home
chocomake myapp

Answer asked questions to create a self-signed SSL certificate.

 

Install Chocolate in PM2

su - myapp

Start 'myapp'

pm2 start coffee --name="myapp" -- /usr/lib/node_modules/chocolate/server/monitor.coffee /home/myapp
    
pm2 save
pm2 startup
ctrl+d
-- then execute the command that was displayed

To stop, start or restart 'myapp'

pm2 stop myapp
pm2 start myapp
pm2 restart myapp

 


<a name="Choco-UseIt"></a> Use it

Chocolate runs on your server and responds to https requests on port 8026

You can change port number in the pm2 start command where you append the port parameter:

pm2 start coffee --name="myapp" -- /usr/lib/node_modules/chocolate/server/monitor.coffee /home/myapp 8081

You can also use a simple Http server by specifying options in the /home/myapp/data/app.config.json file:

http_only: true
port: 80

<a name="Choco-UseIt-LogOn"></a> Log on

You defined a master key when using chocomake to create myapp.

You enter that key at:

https://myserver:8026/-/server/interface?register_key

<a name="Choco-UseIt-LogOff"></a> Log off

To logoff go to :

https://myserver:8026/-/server/interface?forget_keys

<a name="Choco-UseIt-Enter"></a> Enter Chocolate Studio

To enter Chocolate Studio, go to:

https://myserver:8026/-/server/studio

There you can create, modify

View on GitHub
GitHub Stars190
CategoryDevelopment
Updated1mo ago
Forks19

Languages

CoffeeScript

Security Score

80/100

Audited on Feb 14, 2026

No findings