Git Product home page Git Product logo

ts-node-for-prototyping's Introduction

Quick ts-node deployment template

TLDR:

  1. Zips up files needed to run
  2. Setups environment on remote machine and pushes zipped stuff via scp
  3. Setups project, installs deps and systemd service on autorestart
  4. Maps ports 3000 as 443 and 3001 as 80 using iptables (clears iptables each push)

Idea behind this repo is that you want to create a small app/bot/worker so you are renting a vps-ish instance like AWS ec2 and this repo is just quick and dirty way to kickoff project.

I want to extract parts of this project into more general setup - like running stuff like rust or python, you can actually modify the deploy.sh to install stuff needed for your specific environment.

Setup

  1. Clone repo and break origin link OR use Use as template functionality provided by github
  2. Copy secret.env.template as secret.env - secret.env is gitignored
  3. Change secret.env content, for more info you can check "secret.env vars breakdown" paragraph

Keep in mind that private key should have 700 file perms

  1. Check deploy.sh content, there are security risks (like not checking fingerprints) to make deployment process input-less
  2. Make sure you have zip command installed - more info in deploy.sh (TODO: move it to readme)

secret.env vars breakdown

// TODO

ts-node-for-prototyping's People

Contributors

danielduel avatar

Stargazers

Emil Małańczak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.