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

@davse/users_manager

v1.0.11

Published

Libreria para el menejo de usuarios de un api rest

Downloads

4

Readme

UsersApp

User account management.

Requirements

  1. Have typeorm and postgresql installed.
  2. Configure .env file.
  • USER_MAIL=[[email protected]] /mail manager configuration/
  • PASS_MAIL=[password123]
  • JWTKEY=[abc123]
  • EXPIRYSECONDS=[86400]
  • FRONTEND_CONFIRMATIONEMAIL_PATH=[http://localhost:3000/confirm/]
  • FRONTEND_FORGOTPASSWORD_PATH=[http://localhost:3000/password/]
  • FILE_FOLDER_PATH = "imgs/"
  • VALID_FILESIZE = 2000000
  • VALID_FILEFORMAT = "image/jpeg,image/webp,image/svg+xml"
  • MOBILEPHONE_REGION = "es-AR" /validator npm isMobilePhone/

Functions

  • singIn function (req, res, repository, wsession) Description: This function is for user authentication and session initialization.
  • singUp function (req, res, repository, user) Description: This function is to create a user account.
  • updateUser function (req, res, repository) Description: This function is to update user account information.
  • logOut function (req, res) Description: This function is to exit the session.
  • currentUser function (req, res, repository) Description: This function returns session information for the current user.
  • authenticateMail function (req, res, repository) Description: This function is to authenticate the user's mail account.
  • resetPassword function (req, res, repository) Description: This function finds the user account with the confirmation code generated by the forgotPasswordMail function and resets the user account password.
  • forgotPasswordMail function (req, res, repository) Description: This function generates a confirmation code, associates it with the user account, and sends an email to reset the user account password.

Function variables

-repository is the user repository. -user is an instance of the user entity. -wsession true/false if it implements 'express-session'. Expected structure:

@Entity()
export class Users {

    @PrimaryGeneratedColumn()
    id: number;

    @PrimaryColumn("varchar", { length: 200 })
    mail: string;

    @Column("varchar", { length: 60 })
    userName: string;    

    @Column("varchar", { length: 500 })
    password: string;

    @Column("varchar", { length: 15, default: null})
    mobilePhone: string;

    @Column({default: false})
    verifiedAcount: boolean;

    @Column("date")
    creationDate: Date;

    @Column("varchar",{default: null})
    imgURL: string;

    @Column("varchar",{ length: 200 })
    confirmationCode: string; 
} 

Implementation example : https://github.com/davserc/testUserApp