https://aka.ms/aspnetcore-makeover
- Intro (goals/non-goals/what you'll learn)
- Pick The Right Starting Template
- Web Application (no auth)
- Web API
- SPA
# 1. Add rack-rewrite to your Gemfile and run 'bundle install': | |
# gem 'rack-rewrite' | |
# | |
# 2. Create a file with the contents below in config/initializers/asset_server_middleware.rb | |
# | |
# 3. Rename 'YourApp' below | |
# | |
# 4. In config/environments/production.rb and config/environments/test.rb, set: | |
# config.serve_static_assets = true | |
# config.assets.compile = false |
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> | |
<display-name>Web-Fonts</display-name> | |
<!-- web fonts --> | |
<mime-mapping> | |
<extension>eot</extension> | |
<mime-type>application/vnd.ms-fontobject</mime-type> | |
</mime-mapping> | |
<mime-mapping> |
https://aka.ms/aspnetcore-makeover
# 1) Create your private key | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048 | |
# 2) Generate RSA key | |
$ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key | |
# 3) Get rid of private key | |
$ rm lvh.me.pass.key |
#!/bin/sh | |
# remove previous versions of java | |
sudo yum remove -y java-1.7.0-openjdk | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm" | |
sudo yum localinstall -y jdk-8u92-linux-x64.rpm | |
java -version | |
# download wildfly | |
sudo wget http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.tar.gz |
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
upstream myapp_puma { | |
server unix:/tmp/myapp_puma.sock fail_timeout=0; | |
} | |
# for redirecting to https version of the site | |
server { | |
listen 80; | |
rewrite ^(.*) https://$host$1 permanent; | |
} | |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
Alter the port the script talks to from 8000 to 80:
}).listen(80);
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |