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

node-docker-starter

v1.0.13

Published

Nodejs Backend Starter Template

Downloads

334

Readme

npx node-docker-starter my-app

Nodejs-Docker-Postgres-starter

A starter project for building Rest APIs with Node.js, Typescript, PostgreSQL, and Drizzle ORM. It provides a basic folder structure and starter files to help you get started with your own Rest API quickly and easily.

Features

  • Typescript for type safety
  • PostgreSQL for data storage
  • Drizzle ORM for database operations
  • Swagger for API documentation
  • Inversify for dependency injection
  • Express for handling HTTP requests
  • Docker support for easy deployment

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • PostgreSQL
  • Docker

Installation

  1. Installation command: npx nodejs-docker-starter my-app
  2. Install necessary dependencies: cd my-app && pnpm install
  3. Rename .env.example to .env and update the environment variables:
    DATABASE_URL=your_database_url
    PORT=your_preferred_port
    NODE_ENV=development

Running the Application

  1. Start the server: docker compose up
  2. Access the API documentation: Open http://localhost:<PORT>/api-docs in your browser
  3. User routes are available at: http://localhost:<PORT>/api/user

Testing

  1. Run tests: pnpm test

Folder Structure

my-app/
├── src/
│   ├── application/
│   │   ├── dto/
│   │   ├── services/
│   │   └── useCases/
│   ├── common/
│   │   └── config/
│   ├── domain/
│   │   ├── entities/
│   │   └── interfaces/
│   ├── infrastructure/
│   │   ├── adapters/
│   │   │   ├── errors/
│   │   │   ├── inversify/
│   │   │   ├── logger/
│   │   │   └── swagger/
│   │   ├── database/
│   │   │   ├── migration/
│   │   │   ├── repositories/
│   │   │   └── schema/
│   │   └── server.ts
│   ├── presentation/
│   │   ├── http/
│   │   │   ├── controllers/
│   │   │   └── routes/
│   │   └── middlewares/
│   └── index.ts
├── .docker

API Routes

  • API Documentation: /api-docs
  • User Routes: /api/user
    • Create User: POST /api/user/create

For detailed API documentation and testing, visit the Swagger UI at /api-docs after starting the server.

Contributing

We welcome contributions to improve this starter project. If you'd like to contribute, please follow these steps:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Make your changes and commit them with clear, descriptive messages
  4. Push your changes to your fork
  5. Create a pull request to the main repository

For more detailed information on contributing, please see our CONTRIBUTING.md file.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.