Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
ohbus committed Nov 21, 2023
1 parent 648b530 commit 61c9c65
Show file tree
Hide file tree
Showing 51 changed files with 75 additions and 67 deletions.
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MYSQL_DB_HOST=localhost
MYSQL_DB_PORT=3310
MYSQL_DB_USER=root
MYSQL_DB_PASSWORD=root
APP_PORT_BACKEND=8888
MYSQL_DB_HOST=db
MYSQL_DB_PORT=3311
MYSQL_DB_UNAME=root
MYSQL_DB_PASSWD=root
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
# Copyright © 2021 Subhrodip Mohanta ([email protected])
# Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ Install the project dependencies:
```shell
mvn install
```

Load the `.env` file:
```shell
cp .env.example .env
source .env
```

Update the application.properties file to configure the database connection details:
```shell
Expand Down
17 changes: 10 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
# Copyright © 2021 Subhrodip Mohanta ([email protected])
# Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
Expand All @@ -22,11 +22,13 @@ services:

db:
image: mysql:8
container_name: db
volumes:
- db_data:/var/lib/mysql
restart: always
hostname: db
ports:
- "3310:3306"
- "${MYSQL_DB_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: twitter
Expand All @@ -36,17 +38,18 @@ services:
twitter-backend:
depends_on:
- db
container_name: twitter-backend
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
- "${APP_PORT_BACKEND}:8080"
restart: always
environment:
MYSQL_DB_HOST: db
MYSQL_DB_PORT: 3306
MYSQL_DB_UNAME: root
MYSQL_DB_PASSWD: root
MYSQL_DB_HOST: ${MYSQL_DB_HOST}
MYSQL_DB_PORT: ${MYSQL_DB_PORT}
MYSQL_DB_UNAME: ${MYSQL_DB_UNAME}
MYSQL_DB_PASSWD: ${MYSQL_DB_PASSWD}

volumes:
db_data: {}
2 changes: 1 addition & 1 deletion etc/license-plugin-header-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
Copyright © 2021 Subhrodip Mohanta ([email protected])
Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
Copyright © 2021 Subhrodip Mohanta ([email protected])
Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -33,16 +33,16 @@
public class ApplicationErrorController extends BasicErrorController {

/**
* @param errorAttributes
* @param serverProperties
* @param errorAttributes ErrorAttributes
* @param serverProperties ServerProperties
*/
public ApplicationErrorController(
ErrorAttributes errorAttributes, ServerProperties serverProperties) {
super(errorAttributes, serverProperties.getError());
}

/**
* @param request
* @param request HttpServletRequest
* @return ResponseEntity for Errors
*/
@RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/entity/Hashtags.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/entity/Likes.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/entity/Posts.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/entity/Users.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/model/LikeModel.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/model/PostModel.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/xyz/subho/clone/twitter/model/UserModel.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Twitter Backend - Moo: Twitter Clone Application Backend by Scaler
* Copyright © 2021 Subhrodip Mohanta ([email protected])
* Copyright © 2021-2023 Subhrodip Mohanta ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
Loading

0 comments on commit 61c9c65

Please sign in to comment.