Code Monkey home page Code Monkey logo

okta-node-express-typescript-vue-example's Introduction

Example Node.js API using Express, TypeScript, Vue, and PostgreSQL

This example application shows how to create a Node.js Express web app using TypeScript. Please read Use TypeScript to Build a Node API with Express to see how this app was created.

Requirements

Development setup

  • Clone or download this repository
  • Install modules using npm install
  • Copy .env.sample to .env
  • Set up PostgreSQL with Docker. With docker installed, use the following two commands to create an instance of PostgreSQL for the application. Feel free to change the name and password for the database.
docker pull postgres:latest
docker run -d --name guitar-db -p 5432:5432 -e 'POSTGRES_PASSWORD=p@ssw0rd42' postgres
  • Modify .env to match your PostgreSQL server connection and credentials

  • Initialize the PostgreSQL database by running npm run initdb

  • Create a free Okta Developer Account

  • Set up a new Okta application

    1. Click Applications in the top menu and then click "Add Application"
    2. Click "Web" and click Next
    3. Name your application, and verify the Base and Login URIs are correct. By default, the web application will run locally at http://localhost:8080. Click Done.
  • On the Application screen under the General tab you will find a section for "Client Credentials." You will need to copy the values for "Client ID" and "Client secret" and paste them into the .env file for OKTA_CLIENT_ID and OKTA_CLIENT_SECRET, respectively.

  • Copy the URL for your Okta developer account (e.g. https://dev-123456-admin.oktapreview.com) and paste it into the .env file as the value for OKTA_ORG_URL. Remove -admin from the URL. The setting should look similar to:

OKTA_ORG_URL=https://dev-123456.oktapreview.com

Launching application

To run the application in development mode:

npm run dev

By default, the web application should now be running at http://localhost:8080.

Links

This example application uses:

Help

Please post any questions as comments on the blog post, or visit our Okta Developer Forums. You can also email [email protected] if you would like to create a support ticket.

License

Apache 2.0, see LICENSE.

okta-node-express-typescript-vue-example's People

Contributors

reverentgeek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.