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

mxr-create-node-app

v1.0.5

Published

> my own node app template

Downloads

13

Readme

mxr-create-node-app

my own node app template

This repository contains, how says the title, my own Node JS template.

I've decided to do this repository to do easier when I'll create a Node JS API (and who knows it helps another people), program or something like that. It contains all that I usually use in my applications.

That is:

About Typescript

How I use to say: "since Typescript, there is no reason to not use it".

Since I discovered Typescript, I've never done a pure Javascript project anymore. The help that Typescript give us is, no doubt: indispensable.

I use ts-node-dev to compile and run Typescript. It does tsc and node's jobs together. Instead of run:

 yarn tsc
 yarn node /src/example.js

I just run:

 yarn ts-node-dev /src/example.ts

In this case, if your run yarn dev, the above command is executed. This script is setted up to run index.ts in src directory.

About commits

This template has the commitlint that check if your commit messages is, in according with the conventional commit format.

The commitlint check your message commit and the husky, throught git hooks, ensures that commitlint script be executed when you commit.

It make yours commit more understanble. :smile:

How commit:


    ## type(scope?): subject
    fix(server): send cors headers ## example from commitlint lib
    feat: add comment section

About the style-guide

This template uses the Standard Styled Guide, which can be found here, except about the semicolons. Semicolons are always necessary here.

That utilizes the ESLint library to alert us about the mistakes that we can be doing during our development.

The Prettier library, for his time, is used how code formatter. It format our code to us according with our styled guide's rules.

Extensions used in VS Code: Eslint from Microsof and Prettier Code Formatter from Prettier.

What putting in VS Code's settings.json:

    "editor.formatOnSave": true, 
    "prettier.eslintIntegration": true, 

In src/index.ts you can fiind a simple example about the styled guide used.

About Jest

Jest is the library which I use to test my applications. There is no much to talk about. I've tried keep jest.config.ts as simples as it come and installed ts-jest because of Typescript.

How use:

You can get this template in github or:

    npx mxr-create-node-app my-app

If you want to use express, you can use the express template. It comes with express, @types/express, supertest and @types/supertest.

    npx mxr-create-node-app my-app --template-express

That is all, folks! :metal: