Skip to content

The main purpose of this repository is to demonstrate server-side authentication system using Passport, Node.js, and TypeScript

Notifications You must be signed in to change notification settings

febriadj/passportts-starter

Repository files navigation

Passport.ts Starter

The main purpose of this repository is to demonstrate local and oauth authentication systems using @passport and workflow for writing Node.js code in TypeScript.

Getting Started

Installation

$ git clone https://github.com/febriadj/passportts-starter.git

Clone and open this repository in your IDE or text editor.

$ mv .env.example .env

Rename the .env.example file to .env and complete the required "environment variables".

$ npm install && npm run prepare
$ npm start

See more commands in package.json.

Config

// ./src/config.ts
const config: Readonly<IConfig> = {
  isProd: process.env.NODE_ENV === 'production',
  port: 8080,
  cors: {
    origin: ['http://localhost:3000'],
  },
  // ...
};

Set up the server basic configuration in ./src/config.ts file.

Reset Git History

$ rm -rf .git

Remove .git folders before reinitializing.

$ git init && npm run prepare

Reinitialize Git and @husky.

(Back to top)

About

The main purpose of this repository is to demonstrate server-side authentication system using Passport, Node.js, and TypeScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published