kyle-ssg / example-vercel-deployment

Home Page:example-vercel-deployment.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prerequisites

What things you need to install the software and how to install them

Location Suggested Version
NodeJS >= 6.0.0
npm >= 4.0.0

Deployment with Now

Out the box, this setup supports deploying to https://zeit.co

npm i now -g
now

Installing

npm i

Running

Development

Hot reloading for client / server

npm run dev

Deploying

Every branch gets deployed with Zeit. See the deployments tab in this GitHub.

Testing with jest

allows component level, unit, saga and reducer testing

npm run test

E2E tests with nightwatch

requires dependencies listed in tests/e2e/readme.md

npm run test:e2e

Generating pact tests files

Only really relevant if the backends use pact requires dependencies listed in tests/pact/readme.md

npm run test:pct

Running a pact mock server

Can be done regardless of if pact is installed

npm run test:pact:server

ENV variables

Variables that differ per environment are exported globally to window.Project in common/project.js, this file gets replaced by a project.js located in env by webpack based on what is set to the "ENV" environment variable (e.g. ENV=prod).

You can override each variable individually or add more by editing environment.js.

e.g. with API_URL=test npm run test Project.API will be "test"

Storybook

This project uses storybook, running the project in dev mode will launch storybook on port 4000, this will render stories according to /stories/index.

Web Entrypoint

pages/_app.js is where the initial app code is run

Creating pages

As with any standard nextjs project you need to add any pages to /pages/url.js. See https://nextjs.org/learn/basics/navigate-between-pages/using-link.

There's a standardised Page component which will add any seo meta tags necessary. Usage:

          <Page title={Constants.titles.partners} canonical="partners">
               <div>Content</div>
          </Page>

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Getting Help

If you encounter a bug or feature request we would like to hear about it. Before you submit an issue please search existing issues in order to prevent duplicates.

Get in touch

If you have any questions about our projects you can email projects@solidstategroup.com.

Libraries of note

"react-autocomplete": "^1.8.1", for a suitable autocomplete
"react-autolinker": "^1.0.7", converting @ # etc to html
"react-json-tree": "^0.11.2", debugging json in UI

About

example-vercel-deployment.vercel.app


Languages

Language:TypeScript 58.4%Language:JavaScript 23.4%Language:SCSS 17.6%Language:Shell 0.6%