Giter Club home page Giter Club logo

cognito-react-nodejs-example's Introduction

Cognito Web Application Example Project

This is an example project for an upcoming article on how to provide authentication for a web application using Amazon Cognito.

๐Ÿš€ Live Demo

Screenshot of Demo Application with Sign In and Register Button

This project was generated using the Goldstack Project Builder from the templates:

Getting Started

If you want to explore this repository on your local machine, please follow the below instructions. For any questions or feedback, please be welcome to raise an issue on GitHub ๐Ÿค— .

1. Fork and clone the repository

Fork this repository and then clone the fork your local machine.

2. Install required local dependencies

A few dependencies need to be available in your development system. Please verify they are present or install them.

  • Node v12+
  • Yarn v1.22.5+
  • Docker v19+

Open a terminal and run the following commands:

node -v
yarn -v
docker --version

This should produce the following output:

Confirming versions in the console

If you need to install or update any of the dependencies, please see the following guides:

3. Initialise project and install NPM Dependencies

Run yarn in your project directory to install and download all dependencies.

The installation process should take around 3-10 minutes depending on the dependencies that need to be downloaded.

Installing project dependencies

You can confirm everything was installed correctly by running yarn -v. This should show a yarn version of 3.0.0+.

Confirming Yarn Version after install

4. Build modules

Make sure that the project compiles correctly by running yarn build your project directory:

Building your project

Note that this command also ensures that all TypeScript project references are configured correctly.

5. Configure VSCode

In order to setup VSCode, open the project in VSCode.

VSCode may prompt you to ask if you trust the authors of the workspace. Respond with Yes.

VSCode Prompt trust authors

You may also be asked if you want to install recommended extensions for this workspace. We recommend to do so since the template will be optimised to work with the suggested extensions.

VSCode Prompt install extensions

If you want to install the necessary extensions manually, here are links to the extensions required:

6. Initialise TypeScript

Locate a .ts or .tsx file in the workspace and open it. When asked whether to use the workspace TypeScript version, click Allow.

VSCode Locate TypeScript

In the status bar on the bottom right-hand corner of the VSCode editor you should now see TypeScript.

TypeScript status icon in VSCode

7. Do Some Local Testing

Open a Terminal in VS code and navigate to the folder: packages/server-side-rendering.

Here run the command:

yarn watch

A server will be started on your local machine that allows you to test the application.

For more information, see the Goldstack documentation:

8. Deploy to Your Own AWS Account

There are a few steps involved for making this project work on your own account. Please see the following documentation for more information:

cognito-react-nodejs-example's People

Contributors

mxro 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.