GitHub - callicoder/spring-security-react-ant-design-polls-app: Full Stack Polls...
source link: https://github.com/callicoder/spring-security-react-ant-design-polls-app
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Readme.md
Building a Full Stack Polls app similar to twitter polls with Spring Boot, Spring Security, JWT, React and Ant Design
Tutorials
I've written a complete tutorial series for this application on The CalliCoder Blog -
Steps to Setup the Spring Boot Back end app (polling-app-server)
-
Clone the application
git clone https://github.com/callicoder/spring-security-react-ant-design-polls-app.git cd polling-app-server
-
Create MySQL database
create database polling_app
-
Change MySQL username and password as per your MySQL installation
-
open
src/main/resources/application.properties
file. -
change
spring.datasource.username
andspring.datasource.password
properties as per your mysql installation
-
-
Run the app
You can run the spring boot app by typing the following command -
mvn spring-boot:run
The server will start on port 8080.
You can also package the application in the form of a
jar
file and then run it like so -mvn package java -jar target/polls-0.0.1-SNAPSHOT.jar
-
Default Roles
The spring boot app uses role based authorization powered by spring security. To add the default roles in the database, I have added the following sql queries in
src/main/resources/data.sql
file. Spring boot will automatically execute this script on startup -INSERT IGNORE INTO roles(name) VALUES('ROLE_USER'); INSERT IGNORE INTO roles(name) VALUES('ROLE_ADMIN');
Any new user who signs up to the app is assigned the
ROLE_USER
by default.
Steps to Setup the React Front end app (polling-app-client)
First go to the polling-app-client
folder -
cd polling-app-client
Then type the following command to install the dependencies and start the application -
npm install && npm start
The front-end server will start on port 3000
.
Recommend
-
204
Building Reactive Rest APIs with Spring WebFlux and Reactive MongoDBRajeev SinghSpring BootSeptember 20, 20174 mins read
-
113
Building Restful APIs with Kotlin, Spring Boot, Mysql, JPA and HibernateRajeev SinghSpring BootOctober 06, 20173 mins read...
-
45
Readme.md Spring Boot React OAuth2 Social Login Demo
-
36
-
47
Polls 2.0: Visible Votes, Multiple Answers, and Quiz Mode
-
14
Easily create surveys, quizzes, and polls. Loading…
-
9
The many flaws with design polls...
-
2
Your UI design polls don’t add value for discourse because they lack context?Your UI design polls don’t add value because they lack context? Find out 3 ways to change that.Advance your vocabulary and overal...
-
8
How Tumblr turned social media polls into a game design challenge / Home cooking, history, and horniness: Tumblr’s on-brand creative mayhem has adapted polls into a simple gaming platform.By
-
5
...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK