Skip to content

Instantly share code, notes, and snippets.

Avatar

Shijie Zhou shijiezhou1

View GitHub Profile
@shijiezhou1
shijiezhou1 / gist:82540859642fd24e1b5a59f1c4624c15
Created Apr 13, 2020
Setup Nginx Configuration For Server
View gist:82540859642fd24e1b5a59f1c4624c15
server {
listen 80;
location / {
# if you index.js is listening on port 3000
# or for location
# proxy_pass http://0.0.0.0:3000
proxy_pass http://127.0.0.1:3000
}
}
@shijiezhou1
shijiezhou1 / app.js
Last active Apr 13, 2020
Restifyjs Starter
View app.js
// app.js
const http = require('http');
// Create an instance of the http server to handle HTTP requests
let app = http.createServer((req, res) => {
// Set a response type of plain text for the response
res.writeHead(200, {'Content-Type': 'text/plain'});
// Send back a response and end the connection
@shijiezhou1
shijiezhou1 / serverUbuntu.conf
Created Mar 6, 2020
Setting up Ubuntu config file in Nginx with SSL
View serverUbuntu.conf
#
server {
listen 80;
listen [::]:80;
server_name yourdomainname.com www.yourdomainname.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
@shijiezhou1
shijiezhou1 / Architecture
Last active Jan 23, 2020
Architecture Proposal
View Architecture
# Backend Architecture (Design Proposal)
[AWS DEMO](https://gist.githubusercontent.com/shijiezhou1/62de971da9cb8795a974739b11c4933b/raw/1eed6338564390bb697321c8163acb6214d6d107/aws.jpg)
Please provide a visualization with a detailed explanation on the client-server architecture proposed.
## API Gateway Integration
- To satisfy and meet the requirements, the backend for the software is using Amazon API Gateway which provides fully managed service. For example, it allows users to publish, create, monitor, and secure all APIs on any scale. Since they do not introduce the concepts of RPC even it was way faster than restful, we will just stick with RESTful, HTTP/HTTPs and Web-socket API.