Git Product home page Git Product logo

demo-spring-nextjs-app's Introduction

Demo Spring Nextjs App

A demo todo app with Spring Boot and Nextjs.

Getting started

The first thing you'll want to do is set up your Auth0 SPA App as well as the frontend. Instructions for that can be found here. Auth0 specific instructions can be found here.

Once the Auth0 SPA App and the frontend have been set up, you'll then need to run

# Make a copy of the secrets file for localhost
cp secrets-localhost.properties.SAMPLE secrets-localhost.properties

Then you'll need to fill in the auth0.domain and auth0.clientId fields with the credentials from you Auth0 App.

At this point, you should be able to run the app locally via

# Run the backend
mvn spring-boot:run

# Run the frontend
cd frontendDomain
npm run dev

Deploying to Production

Deploying to production consists of the following steps:

  1. Create the heroku app (if it doesn't already exist) and link it to your github repo.
  2. Push all changes to the master branch, or whatever branch you deploy from.
  3. If this is the first deploy, do the following
# Make your copy of the production secrets file
cp secrets-heroku.properties.SAMPLE secrets-heroku.properties

# FILL IN THE missing PROPERTIES in secrets-heroku.properties (auth0 creds can carry over from localhost file)
  1. Don't forget to follow deployment instructions for the frontend at the bottom of here.

  2. Once the frontend is deployed, you'll most likely need to update the frontend.domain property in secrets-heroku.properties so that CORS will work. Once you've updated the values, you can update them in production via

./setHerokuEnv.sh --app APP-NAME-ON-HEROKU
  1. You may need to update values in production to point it to the newly hosted backend on heroku. Instructions for that can be found here.

demo-spring-nextjs-app's People

Contributors

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