Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chisel/steroids

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chisel/steroids

Framework for building Node.js servers with Express on steroids!

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
Created
Source

Express on Steroids!

Steroids helps building backend solutions with Node.js, Express, and TypeScript by introducing new components that are easy and fast to develop.

Here's a quick list of features Steroids provides:

  • TypeScript enabled
  • Powered by Express
  • Automatic code minification
  • Logic is encapsulated into "Services" and router middlewares are grouped as "Routers"
  • Routes are easily defined using the Router decorator
  • Built-in input validation mechanism with routers (request body, headers, query parameters, etc.)
  • Ability to extend the validation logic with custom validators
  • Dynamic route and service installation
  • Dynamic service injection without circular dependency issues
  • Path alias support for easier imports
  • Unit testing with Mocha and Chai
  • TypeDoc ready

Installation

npm install @chisel/steroids -g

Steroids Framework

You can read the official documentation to learn how to use Steroids to develop backend solutions.

CLI Usage

After installing Steroids globally, the sd command will be available with the following options:

  • sd new <name> [options]: Creates a new Steroids project. The project name should be in kebab case.
    Options:
    • -m, --minimal: Skips setting up tests and examples.
    • --skip-examples: Skips setting up examples.
    • --skip-tests: Skips setting up tests.
    • --skip-npm-install: Skips installing dependencies.
    • --skip-git: Skips initializing git repository.
    • -v, --verbose: Verbose logging.
  • sd add router <name> [options]: Generates a router component under src/routers.
    Options:
    • -d, --directory <path>: A path to override the default location the router is generated at.
    • --skip-tests: Skips generating the unit test for router.
  • sd add service <name> [options]: Generates a service component under src/services.
    Options:
    • -d, --directory <path>: A path to override the default location the service is generated at.
    • --skip-tests: Skips generating the unit test for service.
  • sd path list: Displays a list of all existing paths.
  • sd path new <alias> <target>: Creates a new path (target must be relative to src).
  • sd path delete <alias>: Deletes a path.
  • sd build [options]: Builds the source into dist.
    Options:
    • -v, --verbose: Displays all logs.
  • sd run [options]: Builds and runs the server.
    Options:
    • -p, --port <port_number>: Overrides the port number.
    • -w, --watch: Enables live reloading by watching the source files for changes.
    • --skip-build: Skips building the source code before running the server.
    • -v, --verbose: Displays all logs.
  • sd test [options]: Builds and runs the tests against the last server build.
    Options:
    • -v, --verbose: Displays all logs.
  • sd docs [options]: Generates the documentation using TypeDoc inside docs directory.
    Options:
    • -s, --serve: Serves the documentation on port 7000.
    • -p, --port: Overrides the port number the documentation is being served on.
    • -d, --directory <path>: A path relative to project root to override the default documentation directory.
    • -v, --verbose: Displays all logs.
  • sd --version: Displays Steroids version.
  • sd --help: Displays Steroids help. You can also use this option with any commands to view detailed usage information.

Examples

Creating a new project

Create a new project called My Project:

sd new my-project
Adding a router

Add a new router called UserAuth at src/routers/user-auth.router.ts:

sd add router user-auth
Adding a service

Add a new service called Firebase at src/services/firebase.service.ts:

sd add service firebase
Managing paths

List all TypeScript paths:

sd path list

Add a new path for modular validators at src/validators:

sd path new "@steroids/validator/*" "validators/*.validator"

Delete the validators path:

sd path delete "@steroids/validator/*"
Building the source code

Build the source into dist:

sd build
Running the server

Run the server on default port 5000:

sd run

Run the server on port 5003 with live reloading and skip building for the first time:

sd run --port 5003 --watch --skip-build
Running the tests

Build and run the tests:

sd test
Generating the documentation

Generate the documentation at docs and serve on port 5004:

sd docs -s -p 5004

Keywords

FAQs

Package last updated on 09 Aug 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc