Skip to content

Commit 7fb0887

Browse files
Feature/post ssr (#145)
* Redesign post feature to render content on server-side * Fix SSR state * Improve router config * Use right value of event type attribute * Upgrade Angular, SSR adjustments * Global adjustments * Prevent 404 indexing
1 parent 53a4921 commit 7fb0887

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3391
-2563
lines changed

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@
4747
},
4848
"styles": ["styles/styles.scss"],
4949
"prerender": {
50-
"routesFile": "routes.txt"
50+
"routesFile": "dist/routes.txt"
5151
},
5252
"scripts": [
5353
"node_modules/prismjs/prism.js",
5454
"node_modules/prismjs/components/prism-typescript.min.js",
55+
"node_modules/prismjs/components/prism-c.min.js",
5556
"node_modules/prismjs/components/prism-json.min.js",
5657
"node_modules/prismjs/components/prism-bash.min.js",
5758
"node_modules/prismjs/components/prism-kotlin.min.js",

content/posts/2021/06/16/flexible-configuration-with-deferred-resources/post.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tags: mobile,android,open source,deferred resources
1414

1515
Our feature libraries, which include UI, have a number of varying requirements regarding
1616
configuration by our customers. (My colleague Hari wrote about one such library's requirements
17-
[here]({% post_url 2020-08-14-android-configuration-driven-ui-from-epoxy-to-compose %}).)
17+
[here](/2020/08/14/configuration-driven-ui-from-epoxy-to-compose).)
1818
Resources (text, colors, images, etc.) are a common type of configuration, and can be defined in
1919
various ways—typically in code, resources, or theme attributes. We created
2020
[Deferred Resources](https://engineering.backbase.com/DeferredResources) to support such

content/posts/2021/09/10/hello-blockchain/post.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hello, Blockchain
22

3-
Create a \"Hello, world!\"-style React app that reads and displays data from the Joystream blockchain
3+
Create a "Hello, world!"-style React app that reads and displays data from the Joystream blockchain
44

55
![](assets/blockchain_banner.png)
66

content/posts/2024/06/28/resilient-microservices/post.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ It does not matter if you are using a Java application, the Spring Framework, or
5454
By having declared timeout we can deal with issues when dependency is unreliable, sometime we just a cut a connection and just a log an error, but in other cases we need to quickly notify end user about the error.
5555

5656
## Learn more:
57-
## https://resilience4j.readme.io/docs/timeout
58-
## https://www.baeldung.com/spring-rest-timeout
57+
- https://resilience4j.readme.io/docs/timeout
58+
- https://www.baeldung.com/spring-rest-timeout
5959

6060
### **Circuit Breaker Pattern**
6161
Circuit Breaker Pattern is a crucial mechanism used in a microservices architecture to prevent cascading failures across services.
@@ -137,8 +137,8 @@ public class CircuitBreakerLogger {
137137
```
138138

139139
## Learn more:
140-
## https://resilience4j.readme.io/docs/circuitbreaker
141-
## https://medium.com/bliblidotcom-techblog/resilience4j-circuit-breaker-implementation-on-spring-boot-9f8d195a49e0
140+
- https://resilience4j.readme.io/docs/circuitbreaker
141+
- https://medium.com/bliblidotcom-techblog/resilience4j-circuit-breaker-implementation-on-spring-boot-9f8d195a49e0
142142

143143
### **Retry Pattern**
144144

@@ -195,7 +195,7 @@ resilience4j.retry.metrics.enabled: "true"
195195
```
196196

197197
## Learn more:
198-
## https://resilience4j.readme.io/docs/retry
198+
- https://resilience4j.readme.io/docs/retry
199199

200200
### **Summary**
201201

docker-compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3'
2+
services:
3+
nginx:
4+
image: nginx:latest
5+
ports:
6+
- '80:80'
7+
volumes:
8+
- ./dist/blog/browser:/usr/share/nginx/html
9+
- ./nginx.conf:/etc/nginx/nginx.conf

nginx.conf

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
user nginx;
2+
worker_processes auto;
3+
error_log /var/log/nginx/error.log;
4+
pid /var/run/nginx.pid;
5+
6+
# Include the configurations for the modules
7+
include /usr/share/nginx/modules/*.conf;
8+
9+
events {
10+
worker_connections 1024;
11+
}
12+
13+
http {
14+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
15+
'$status $body_bytes_sent "$http_referer" '
16+
'"$http_user_agent" "$http_x_forwarded_for"';
17+
18+
access_log /var/log/nginx/access.log main;
19+
20+
sendfile on;
21+
tcp_nopush on;
22+
tcp_nodelay on;
23+
keepalive_timeout 65;
24+
types_hash_max_size 2048;
25+
26+
include /etc/nginx/mime.types;
27+
default_type application/octet-stream;
28+
29+
# Load modular configuration files from the /etc/nginx/conf.d directory.
30+
include /etc/nginx/conf.d/*.conf;
31+
32+
33+
server {
34+
listen 80;
35+
sendfile on;
36+
default_type application/octet-stream;
37+
38+
gzip on;
39+
gzip_http_version 1.1;
40+
gzip_disable "MSIE [1-6]\.";
41+
gzip_min_length 256;
42+
gzip_vary on;
43+
gzip_proxied expired no-cache no-store private auth;
44+
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
45+
gzip_comp_level 9;
46+
47+
root /usr/share/nginx/html;
48+
49+
location / {
50+
try_files $uri $uri/ /index.html =404;
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)