npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nodejs-quickstart

v2.0.0

Published

A starter kit for Node.js with typescript projects

Downloads

9

Readme

nodejs-quickstart Quality Gate StatusGithub action workflow statusCodeQL Analysisnjsscan AnalysisMaintainabilityTest Coverage

Skeleton for Node.js applications written in TypeScript

Introductions

Purpose

Our main purpose with this Skeleton is to start server application with node js and typescript.

Try it!! I am happy to hear your feedback or any kind of new features.

Common Features

Common Features

  • Quick start

    • Simple scaffolding based on Typescript syntax
    • Easy global environment configuration and error handling
    • Flexible for adding new features
  • Contiuous Integration

  • Documentation Standards

    • Swagger documentation support and Postman collections
    • Clear instructions in the readme file
  • Test Coverage Maintenance

    • Comprehensive test coverage with eslint, prettier, and husky integration
  • Production Ready Setup

    • Followed best practices for security and efficiency
    • Integrated Winston Logger and included only necessary npm modules

Core NPM Module

  • [x] express, @types/express
  • [x] @types/node
  • [x] typescript
  • [x] dotenv
  • [x] cors
  • [x] helmet
  • [x] http-status-codes
  • [x] winston

Start the application

Workflow

Start The application in Development Mode

  • Clone the Application git clone https://github.com/santoshshinde2012/node-boilerplate.git
  • Install the dependencies npm install
  • Start the application npm run dev

Start The application in Production Mode

  • Install the dependencies npm install
  • Create the build npm run build
  • Start the application npm run start
  • Before starting make sure to update your .env values for your refrence just check .env.example

Project Structure

| Name | Description | | ---------------------------- | ----------------------------------------------------------- | | wiki/ | You can add project documentation and insructions file here | | src/ | Source files | | src/abstractions | Abstarct classes and Interfaces | | src/components | REST API Components & Controllers | | src/lib | Reusable utilises and library source code like a logger | | src/middleware/ | Express Middlewares like error handler feature | | build/ | Compiled source files will be placed here | | tests/ | Test cases will be placed here | | tests/helpers/ | Helpers for test cases will be placed here | | tests/unit-tests/ | Unit Test cases will be placed here | | tests/integration-tests/ | API routes (Integration) Test cases will be placed here |

Workflow

Workflow

Encryption

Set the APPLY_ENCRYPTION environment variable to true to enable encryption.

Swagger API Documentation

The swagger documentation is available at the following url ${host}/docs:

http://localhost:8080/docs

Default System Health Status API

  • ${host}/api/system/info - Return the system information in response
  • ${host}/system/time - Return the current time in response
  • ${host}/system/usage - Return the process and system memory usage in response
  • ${host}/system/process - Return the process details in response
  • ${host}/system/error - Return the error generated object in response

Swagger API Documentation

Postman Collections

Refrences

Notes

1. Why is my git pre-commit hook not executable by default?

  • Because files are not executable by default; they must be set to be executable.
chmod ug+x .husky/*
chmod ug+x .git/hooks/*

2. Production Best Practices: Security

  • Don’t use deprecated or vulnerable versions of Express
  • Use TLS
  • Use Helmet
  • Use cookies securely
  • Prevent brute-force attacks against authorization
  • Ensure your dependencies are secure
  • Avoid other known vulnerabilities
  • Additional considerations

3. Tutorials

Connect with me on