Skip to content

Starter kit for Angular 2 applications using Auth0, webpack, and an Express server and MongoDB back end with full CRUD functionality

License

Notifications You must be signed in to change notification settings

whtouche/ng2-auth0-starter

Repository files navigation

Angular 2 Auth0 Express MongoDB CRUD Starter

This repo uses Angular 2 Beta 3.

Prerequisites

Before getting started you will need the following things:

  • MongoDB
  • Node.js / NPM
  • An Auth0 account (they're free)

I assume if you've found your way here you at least have the first two already taken care of.

Getting Started

Go to Auth0 and create a new application

The information you need can be found under the "Settings" tab after you create a new app - it will look like this:

Auth0 Screenshot

Add your Auth0 account information to the following files:

Auth0.json

  • secret = Client Secret
  • audience = Client ID

app.ts

  • On the "lock = new Auth0Lock" line, add your 'Client ID' and 'Domain'

Install the dependencies:

$ npm install

Compile the TypeScript into JavaScript and create the bundle:

$ npm run build

In separate terminal windows, run the mongo daemon, start the Express server, and start the webpack-dev-server:

$ mongod
$ npm run serve
$ npm start

Navigate to http://localhost:3000/

Contributing

Do you want to help? That would be great - this is still a work in progress. Check out the issues, there are definitely some things that I haven't figured out yet. Pull requests are welcome and encouraged.

Acknowledgements

This project owes a ton to Ajden Towfeek, please check out his YouTube channel for some of the best instructional videos on Angular 2 that I have found:

License

WTFPL

About

Starter kit for Angular 2 applications using Auth0, webpack, and an Express server and MongoDB back end with full CRUD functionality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published