Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ vue-social/node_modules
vue-social/src/firebase.js
vue-social/yarn.lock

vue-social/nohup.out
springbackend/nohup.out

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Social-network
a simple social network


**Tutorials I followed**
##Frontend
https://medium.com/@anas.mammeri/vue-2-firebase-how-to-add-firebase-social-sign-in-into-your-vue-application-21f341bbf1b
Expand Down
2 changes: 2 additions & 0 deletions runsocial.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sh springbackend/run.sh
sh vue-social/run.sh
5 changes: 4 additions & 1 deletion springbackend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
Expand Down
10 changes: 2 additions & 8 deletions springbackend/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#git stash
#git checkout master
#git pull

sudo kill -9 `sudo lsof -t -i:8080`
mvn package -DskipTests=true
# create upload-dir
#mkdir upload-dir
nohup java -jar -Dspring.profiles.active=prod target/ecommerce-backend-0.0.1-SNAPSHOT.jar &
#java -jar -Dspring.profiles.active=prod target/ecommerce-backend-0.0.1-SNAPSHOT.jar &
nohup java -jar target/ecommerce-backend-0.0.1-SNAPSHOT.jar &
#java -jar -Dspring.profiles.active=prod target/springandfirebaseauth-0.0.1-SNAPSHOT.jar &
#jobs -l
#nohup python3 -m http.server 8001 &

16 changes: 8 additions & 8 deletions springbackend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ spring:
application:
name: visualizer
datasource:
# url: jdbc:h2:mem:testdb
# username: sa
# password: password
url: jdbc:h2:mem:testdb
username: sa
password: password
# alternative datasource: external mysql database example
url: jdbc:mysql://localhost:3306/social_network
username: root
password: root
#url: jdbc:mysql://localhost:3306/social_network
#username: root
#password: abcdTest9

jpa:
# remove the next line, if you use mysql:
database-platform: org.hibernate.dialect.MySQL5Dialect
database-platform: org.hibernate.dialect.H2Dialect
hibernate:
ddl-auto: update

Expand All @@ -39,7 +39,7 @@ security:
allowed-origins:
- https://${DOMAIN}
- http://localhost:3000
- http://localhost:8081
- http://139.59.38.249:8081
allowed-methods:
- GET
- POST
Expand Down
2 changes: 2 additions & 0 deletions vue-social/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm i
nohup npm run serve &
2 changes: 1 addition & 1 deletion vue-social/src/config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const API_BASE_URL = "http://localhost:8080/";
export const API_BASE_URL = "http://139.59.38.249:8080/";
48 changes: 48 additions & 0 deletions vue-social/src/views/Chat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<template>
<ul class="list-group">
<li class="list-group-item" v-for="item in users" v-bind:key="item.id">
<div class="row">
<div class="col">
<div v-if="item.name === null">
{{item.email}}
</div>
<div v-else>
{{item.name}}
</div>
</div>
<div class="col">
<img class="img" v-bind:src="item.picture" alt="avatar">
</div>
</div>
</li>
</ul>
</template>

<script>

export default {
name: "listusers",
data() {
return {
messages: [],
}
},
mounted() {
this.getusers();
},
methods: {
getusers() {

}
}
}
</script>

<style scoped>

.img{
max-width: 70px;
max-height: 70px;
}

</style>