GithubHelp home page GithubHelp logo

hhy5277 / stormpath-express-react-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stormpath/stormpath-express-react-example

0.0 1.0 0.0 572 KB

Fullstack example application, using React, Express.js, and Stormpath

License: Apache License 2.0

JavaScript 96.74% HTML 3.26%

stormpath-express-react-example's Introduction

#Stormpath is Joining Okta We are incredibly excited to announce that Stormpath is joining forces with Okta. Please visit the Migration FAQs for a detailed look at what this means for Stormpath users.

We're available to answer all questions at [email protected].

Stormpath React + Express Fullstack Example Project

This repository is an example fullstack web application using React on the front-end and Express.js as your back-end server. It uses express-stormpath and stormpath-sdk-react to authenticate users, protect your server API, and render default login and registration screens in your React application.

1. Getting Started

To run this example project on your local computer, you will need to have Node.js installed and a Stormpath tenant account. If you don't have a Stormpath account, sign up for a free account at https://api.stormpath.com/register.

2. Installation

Clone this repository, then using a terminal, navigate to the directory and run the following:

$ npm install

3. Gather Stormpath Configuration

You'll need to Download an API Key Pair from the Stormpath Admin Console, and find the Application Href (also called REST URL) of the Application that you will use for your project. The default application is called "My Application" and you can use that to get started.

4. Provide Configuration To Your Application

Provide the API Key ID, API Key Secret, and Application Href to your environment, with one of these strategies:

Unix Environment Variables:

export STORMPATH_CLIENT_APIKEY_ID=YOUR_ID_HERE
export STORMPATH_CLIENT_APIKEY_SECRET=YOUR_SECRET_HERE
export STORMPATH_APPLICATION_HREF=YOUR_APP_HREF

Windows Environment Variables:

set STORMPATH_CLIENT_APIKEY_ID=YOUR_ID_HERE
set STORMPATH_CLIENT_APIKEY_SECRET=YOUR_SECRET_HERE
set STORMPATH_APPLICATION_HREF=YOUR_APP_HREF

Place them in a file named stormpath.yml, in the directory where you run the dev server:

client:
  apiKey:
    id: YOUR_API_KEY_ID
    secret: YOUR_API_KEY_SECRET
application:
  href: https://api.stormpath.com/v1/applications/XXXX

4. Usage

To start the server, run this command in the folder:

$ npm start

If the server is able to start with your configuration, you will see this in your terminal:

Stormpath Ready
Application running at http://localhost:3000

The application should now be running in your browser at http://localhost:3000.

Support

We're here to help if you get stuck. There are several ways that you can get in touch with a member of our team:

stormpath-express-react-example's People

Contributors

brentstormpath avatar robertjd avatar typerandom 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.