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.
$ git clone https://github.com/febriadj/passportts-starter.gitClone and open this repository in your IDE or text editor.
$ mv .env.example .envRename the .env.example file to .env and complete the required "environment variables".
$ npm install && npm run prepare$ npm startSee more commands in package.json.
// ./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.
$ rm -rf .gitRemove .git folders before reinitializing.
$ git init && npm run prepareReinitialize Git and @husky.