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.ts-cli

v0.1.1

Published

A Node.js framework for creating Node APIs with Typescript and Express

Downloads

1

Readme

alt-text

A Node CLI for generating Node.js API using Typescript and Express.

This project was created as practice for creating Node CLIs, working with Node/Typescript, as well as Promises and Async/await.

:package: Getting Started

At this stage Node.ts is not meant to be used as a production development tool, but if you find it useful for your projects I would love to hear about it, If you feel like contributing to the project, by all means fork the repo and make a pull request with any enhancements or bug fixes, I'm sure there are plenty.

:electric_plug: Installing

Node.ts is available as a npm package. To install globally run:

npm install -g node.ts

That's it! If globally installed, Node.ts will create your new project in the current directory of your terminal.

:file_folder: File Structure

The structure of the project is loosely based off of Microsoft's Typscript + Node starter project structure. Below is the output of creating a new Node.ts project:

| Name | Description | | ------------------- | --------------------------------------------------------------------------------------------- | | dist | Contains the distributable (or output) from your TypeScript build. This is the code you ship | | node_modules | Contains all your npm dependencies | | src | Contains your source code that will be compiled to the dist dir | | src/config | Passport authentication strategies and login middleware. Add other complex config code here | | src/controllers | Controllers define functions that respond to various http requests | | src/models | Models define Mongoose schemas that will be used in storing and retrieving data from MongoDB | | src/public | Static assets that will be used client side | | src/types | Holds .d.ts files not found on DefinitelyTyped. | | src/app.ts | Handler for your routes/controllers | | src/server.ts | Entry point to your express app | | __tests__ | Contains your tests. Separate from source because there is a different build process. | | .env | API keys, tokens, passwords, database URI. Clone this, but don't check it in to public repos. | | .gitignore | Gitignore file, containing dist, node_modules, and env by default | | jest.config.js | Used to configure Jest running tests written in TypeScript | | package.json | File that contains npm dependencies. | | staticAssets.ts | Build script that copies images, fonts, and JS libs to the dist folder | | tsconfig.json | Config settings for compiling server code written in TypeScript | | tslint.json | Config settings for TSLint code style checking |

:hammer: Commands

Create a new Node.ts project:
node.ts new/n <projectName>

You will be asked a few simple questions, after which, the project will be created in a directory of the same name, a tsconfig.json, package.json, package-lock.json, jest.config.js, and tslint.json will be built. Git will be initiaized locally and a initial commit will be completed with your new project structure. Afterwards the dependencies will be downloaded.


:clipboard: v0.2.0 and Beyond

  • Fixing the many bugs that will arise...
  • Add command to create new models/controllers through the CLI
  • Unit testing
  • More boilerplate files in new projects, to speed up development
  • CLI Option to create Node.ts CLI application rather than API Server

For any other suggestions, or requests, either post an issue, or feel free to add yourself!

:lock: License

This project is licensed under the MIT License.