Posted by

ITEM TILE – File Size: 9.7K

A bare-bones Twitter clone implemented in a single file


This is a project which has corresponding talk slides

This is a bare bones “Twitter clone” implemented ina single file that you can deploy to EC2

This uses:

The result looks like this:



  1. Create an AWS account

    … by following these instructions

  2. Install Nix:

    bash$ curl | sh

  3. Install the AWS command-line interface:

    bash$ nix-env --install awscli

  4. Configure your AWS credentials

    … by following these instructions

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

    ini[default]aws_access_key_id = …aws_secret_access_key = …

  5. Install NixOps:

    bash$ nix-env --install nixops

  6. Build and redeploy the web application

    bash$ 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 laststep:

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

To destroy the machine and clean up everything, run:

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

Have fun! 🙂

Split files

You can also view the files split out by language:

To restore the repository download the bundle


and run:

 git clone Gabriel439-simple-twitter_-_2019-11-22_16-43-56.bundle 

Uploader: Gabriel439
Upload date: 2019-11-22