Git Product home page Git Product logo

passports-prototype-v2's Introduction

passports-prototype-v2

Prototype for passport journeys.

This is version 2 of the prototype; version 1 can be found at https://github.com/UKHomeOffice/passports-prototype.

Setup

Clone repository

git clone https://github.com/UKHomeOffice/passports-prototype-v2.git

Install npm dependencies

cd to the directory where the project is, then run:

npm install

Development

Run locally

npm start

This will build sources, and serve pages.

Visit localhost:3000 in your browser.

Gulp is used to compile and watch assets.

Browsersync watches HTML files for changes and reloads automatically on port 3001.

Visit localhost:3001 in your browser for automatic reload.

View the prototype online

Visit https://hmpo-prototypes.herokuapp.com in your browser.

It may take a few seconds to load.

Deploying to Heroku

Get yourself a Heroku account and added to the prototype app.

Add the Heroku remote (that you will push to, to deploy):

heroku git:remote -a hmpo-prototypes

To deploy the master branch:

git push heroku master

Archiving the prototype

Once your prototype is ready for testing, it’s time to create an archived version.

Below is a step-by-step process on how to do this.

1. Create a tag

git tag YYMMDD-feature-name

Alternatively, you can add a message with your tag, similar to commits. This is known as an annotated tag:

git tag -a YYMMDD-feature-name -m "First iteration of feature-name for lab 1"

2. Push tags to origin

git push --tags origin master

You should be able to see that git has pushed your tag to the remote:

To https://github.com/UKHomeOffice/passports-prototype-v2.git
* [new tag]           YYMMDD-feature-name -> YYMMDD-feature-name

3. Checkout the archived tag:

Tags can be checked out similar to branches.

If you're not already at the specific commit you want to archive:

git checkout YYMMDD-feature-name

4. Create a new branch for archiving

Create a new branch from that specific commit/tag:

git checkout -b archive/feature-branch-name-v1

5. Remove irrelevant stuff for archiving

Make relevant changes, such as removing links from the startpage, the navigation bar, etc.

6. Commit your changes locally

git commit -m “Update start page to archive feature-name lab session 1”

7. Push your changes to remote

git push origin +archive/feature-branch-name-v1

8. Create a new Heroku app

Each prototype archive will be hosted on a separate Heroku app.

heroku apps:create --region eu hmpo-YYMMDD-feature-name -r heroku-feature-name-v1

hmpo-YYMMDD-feature-name becomes the subdomain in the URL of the Heroku app.

heroku-feature-name-v1 is the remote added to your repository.

9. Deploy the prototype archive to the new Heroku app

To deploy from another branch, where archive/feature-branch-name-v1 is the branch you want to push:

git push heroku-feature-name-v1 archive/feature-branch-name-v1:master

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.