What you need:
- Travis account (just log in with your GitHub credentials to create one)
- Heroku account
- Heroku CLI (
brew install heroku
) - Travis CLI (
gem install travis
)
Let's start:
RewriteEngine On | |
# tsekkaa onko polku jo turvattu eli https:n ylitse | |
RewriteCond %{HTTPS} !=on | |
# jos ei niin uudelleen ohjaa https-polkuun R=redirect L=last eli lopettaa suorittamisen tähän sääntöön | |
RewriteRule ^/?(.*) https://teekoivi.users.cs.helsinki.fi/$1 [R,L] | |
# polku on nyt https:ssä joten voimme proxata sen taustalla pyörivälle node-prosessille |
What you need:
brew install heroku
)gem install travis
)Let's start:
S3 is a cheap way to host static files and pretty easy too (when you know how to do it)
What you need to have in order to do it:
Okey, you're all set. Let's go.
A short tutorial on how to create a basic TypeScript app for a game or another project targeted on frontend.
Create a new folder for your project and cd
there and type npm init
to create package.json
.
Writer whatever you want there or just hit enter to each and then let's install typescript: npm i -S typescript
.
We could install it also globally for some ease of use BUT to me installing global dependencies are annoying so for now let's withold from doing so.
Instead let's add tsconfig.json
manually to the root of our folder. This would be created with tsc --init
but since we are now very stupid we'll do it manually. Copy & paste this inside of it:
Follow the basic setup as in the Docker website. For me I had to download the Docker toolchain from here 🔗.
After that you should have docker installed and the Docker terminal ready to be opened from your desktop.
I followed the instructions from here https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ to create my first Docker container with Node.js.
Here's the short and sweet if you want just to copy and paste to see if it works:
NOTE! On Windows or MacOS machines you cannot go straight to the localhost:49160 to see the app working. As explained here moby/moby#15740 they cannot run the Docker container natively so the port is actually the one on the VirtualBox so for me worked just write docker-machine ip default
and whatever the ip from that is your container's ip. (my app was on http://192.168.99.100:49160/)
Tai samaa ohjetta hivenen modifioimalla minkä tahansa muun palvelimen johon ei tarvita sudo-oikeuksia; RoRin, Djangon tai vaikka Go:n. Huomioitavana on vain users-palvelimen vanha käyttöjärjestelmä: Ubuntu 10.04 joka ei välttämättä kaikkea pyöritä ilman ainakaan ongelmia.
ssh TUNNUS@users.cs.helsinki.fi
jossa TUNNUS on ad-tunnuksesiwanna-htdocs
jos sinulle ei ole jo Apachee asennettuna ja htdocs kansiotatouch ~/htdocs/.htaccess
RewriteEngine On