/flytest

Primary LanguageJavaScript

  1. Create a new folder for your project and go into it with cd <folder name>
  2. Make it a git repository with git init
  3. Copy .github, .dockerignore, .gitignore to this new folder.
  4. Create a new NodeJS project with npm init
  5. Edit package.json to add a start script, such as "start": "node server.js"
  6. Install Express.js with npm i express
  7. Copy the example server from server.js over to this folder
  8. Install flyctl with iwr https://fly.io/install.ps1 -useb | iex
  9. Create a fly account with flyctl auth signup
  10. Sign up with GitHub

  11. Authorize Fly.io

  12. Input your credit card details, needed even if you dont use more than the free tier.
  13. You should see successfully logged in as EMAIL in the terminal
  14. Run flyctl launch
  15. Enter a name for your app, choose a region. Choose no to a Postgresql database and to deploy now
  16. Create a repository on GitHub
  17. Enable GitHub actions in the Actions tab
  18. Go to Settings>Secrets>Actions and create a new secret
  19. Name the secret FLY_API_TOKEN and run flyctl auth token and paste the result as the value
  20. Follow the …or push an existing repository from the command line steps