1. opa
command line server + browserify
opa
Package: opa
Created by: NHQ
Last modified: Wed, 22 Jun 2022 23:01:42 GMT
Version: 11.22.0
License: MIT
Downloads: 62
Repository: https://github.com/NHQ/opa

Install

npm install opa
yarn add opa

famous!

A quick command line bundler for prototyping front-end, multi-user, real-time aplications using browserify. As of the latest version of OPA, it uses browserify via watchify

 npm install -g watchify famous

Now create a new app folder using famous:

famous -c myAppDirname
cd myAppDirname

famous -c creates everything you need to get started. There's an index.js, for your module, an entry.js for your pre-bundle, and a public folder for serving it all up.

Now write your module in index.js, and module.export it.

index.js

 module.exports = function(x){return x + 4}

in your entry.js, do:

 var fn = require('./')
console.log(fn(12))

then whip up the server with famous:

famous -e entry.js -o public/bundle.js

Your app will be served up at a your localhost, port 11001 or greater.
You can edit the code, and b/c we're using watchify, your bundle will update automatically. You have to refresh the page tho.
Note that all arguments to famous are passed to browserify, so you can use browserify to full effect.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code