Skip to content

Commit

Permalink
Updated passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
IliyanID committed Mar 22, 2023
1 parent 64200be commit 11535fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Back-End/src/main/java/com/tco/Server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void configureRestfulApiServer() {
String keyStorePassword = "password";
https.secure(keyStoreLocation, keyStorePassword, null, null);

https.staticFiles.location("/public/build");
http.staticFiles.location("/public/build");

Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
Expand All @@ -71,14 +71,14 @@ public void run() {

private void processRestfulApiRequests()
{
https.get("/Analytics",(request,response)->{
http.get("/Analytics",(request,response)->{
response.type("text/html");
response.header("Access-Control-Allow-Origin","*");
response.status(200); //Success
return analytics.returnHTML();
});

https.get("/EtsyImages",(request,response)->{
http.get("/EtsyImages",(request,response)->{
response.type("application/json");
response.header("Access-Control-Allow-Origin","*");
response.status(200); //Success
Expand All @@ -88,7 +88,7 @@ private void processRestfulApiRequests()
return etsy.getJSONResponse();
});

https.get("/InstagramImages",(request,response)->{
http.get("/InstagramImages",(request,response)->{
response.type("application/json");
response.header("Access-Control-Allow-Origin","*");
response.status(200); //Success
Expand All @@ -97,20 +97,20 @@ private void processRestfulApiRequests()
return instagram.getJSONResponse();
});

https.get("/defaultsite",(request,response)->{
http.get("/defaultsite",(request,response)->{
response.redirect("https://www.lindibracelets.com");
return "";
});

http.before(((request, response) -> {
/*http.before(((request, response) -> {
final String url = request.url();
if (url.startsWith("http://"))
{
final String[] split = url.split("http://");
response.redirect("https://" + split[1]);
}
}));
}));*/
}

public static void main(String[] args)
Expand Down
16 changes: 16 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:14-alpine
RUN apk update
RUN apk add git
RUN apk add maven
RUN apk add openjdk8-jre
RUN npm install -g npm@6.14.15
RUN git clone https://github.com/IliyanID/Lindi-Bracelets.git
RUN cd /Lindi-Bracelets/Front-End && npm install && npm run build
RUN cp -r /Lindi-Bracelets/Front-End/build /Lindi-Bracelets/Back-End/src/main/resources/public
RUN cd /Lindi-Bracelets/Back-End && mvn -q package

WORKDIR /Lindi-Bracelets/Back-End/target

ENTRYPOINT java -jar Server-2.0-jar-with-dependencies.jar
EXPOSE 443
EXPOSE 80
Empty file added Docker/start.sh
Empty file.

0 comments on commit 11535fb

Please sign in to comment.