Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A common way to write reactive and isomorphic apps on any js framework.
An adapter-based, library-agnostic framework for building web applications.
Switch out underlying libraries without changing application code.
Build resuable component, framework, and server adapters that operate transparently.
Adapters for Express
, Mithril
, Browserify
, Coffeeify
, Envify
, Uglify
, and more.
npm install -g paradiso
First, let's create a very simple project with the following structure:
app/
components/
- home.coffee
initializers/
- build.coffee
- client.coffee
- routes.coffee
- server.coffee
(Protip: Feel free to organize your files how you like. Paradiso is unopinionated.)
The app/initializers
directory includes:
build.coffee
- builds the client js assetclient.coffee
- defines the client js assetroutes.coffee
- routes for client and serverserver.coffee
- starts the web serverapp/initializers/build.coffee
:
build = require "paradiso-build"
browserify = require "paradiso-build-browserify"
coffeeify = require "paradiso-build-coffeeify"
browserify paths:
"public/client": "app/initializers/client"
build browserify, coffeeify
app/initializers/routes.coffee
:
routes = require "paradiso-routes"
module.exports = routes map:
"/": require "../components/home.coffee"
app/initializers/client.coffee
:
routes = require "./routes"
client = require "paradiso-client"
client routes
app/initializers/server.coffee
:
routes = require "./routes"
server = require "paradiso-server"
express = require "paradiso-server-express"
server routes, express,
port: 9000
static: "public"
components/home.coffee
:
module.exports = -> "hello!"
Build your client js assets:
coffee app/initializers/build.coffee
or with gulp
:
gulp = require "gulp"
paradiso = require "paradiso"
gulp.task "build", -> require "app/initializers/build"
Start the web server:
coffee app/initializers/server.coffee
or with gulp
:
gulp = require "gulp"
paradiso = require "paradiso"
gulp.task "server", -> require "app/initializers/server"
Now you have a functioning Paradiso project up and running at 127.0.0.1:9000.
This project is available in the getting-started branch of the example repo.
Paradiso ships with paradiso-component, an object oriented approach to writing components.
Add component functionality through the initializers:
app/initializers/client.coffee
:
routes = "./routes"
client = require "paradiso-client"
component = require "paradiso-component"
mithril = require "paradiso-component-mithril"
client routes, component, mithril
app/initializers/server.coffee
:
routes = require "./routes"
server = require "paradiso-server"
express = require "paradiso-server-express"
component = require "paradiso-component"
mithril = require "paradiso-component-mithril"
server routes, component, express, mithril,
port: 9000
static: "public"
Let's build a valid HTML page with content:
components/home.coffee
:
module.exports = class
constructor: ->
@title = "Home"
@content = [
H1 @title
P if @server "server" else "client"
]
view: ->
if @server
@layoutView @
else
@content
LayoutView: class
constructor: ({ @content, @title }) ->
view: ->
HTML [
HEAD @title
BODY @content
]
FAQs
A common way to write reactive and isomorphic apps on any js framework.
We found that paradiso demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.