Skip to content
A bare-bones Twitter clone implemented in a single file
Nix Haskell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Main.hs Add split version of the file Nov 20, 2019
README.md Fix README formatting Dec 6, 2019
initialScript.sql Add split version of the file Nov 20, 2019
simple-twitter.nix Use "default" access key ID Nov 9, 2019
split.nix Add split version of the file Nov 20, 2019

README.md

simple-twitter

This is a project which has corresponding talk slides

This is a bare bones "Twitter clone" implemented in a single file that you can deploy to EC2

This uses:

The result looks like this:

Screenshot

Instructions

  1. Create an AWS account

    ... by following these instructions

  2. Install Nix:

    $ curl https://nixos.org/nix/install | sh
  3. Install the AWS command-line interface:

    $ nix-env --install awscli
  4. Configure your AWS credentials

    ... by following these instructions

    If you did this correctly you should have an ~/.aws/credentials file that looks similar to this:

    [default]
    aws_access_key_id = …
    aws_secret_access_key = …
  5. Install NixOps:

    $ nix-env --install nixops
  6. Build and redeploy the web application

    $ nixops create --deployment simple-twitter simple-twitter.nix
    $ nixops deploy --deployment simple-twitter --allow-reboot

If you make changes you can redeploy the application by re-running the last step:

$ nixops deploy --deployment simple-twitter --allow-reboot

To destroy the machine and clean up everything, run:

$ nixops destroy --deployment simple-twitter
$ nixops delete --deployment simple-twitter

Have fun! 🙂

Split files

You can also view the files split out by language:

You can’t perform that action at this time.