/lykke.com

Primary LanguageJavaScriptCreative Commons Attribution 4.0 InternationalCC-BY-4.0

Source code for the Lykke website. Built with Next.js and styled-components.

Table of Contents

Getting started

Prerequisites

  1. Git
  2. Node: 8.x or greater
  3. Yarn: See Yarn website for installation instructions
  4. A clone of this repo on your local machine

Installation

  1. cd lykke-website to go into the project root
  2. yarn to install the website's npm dependencies

Running locally

  1. yarn dev to run in development mode. You can also specify PORT env variable
  2. Open http://localhost:3000 to view it in the browser

Configuration

This project uses dotenv for injecting configuration. You may find the list of configuration options in config.js file. To provide configuration to the Docker environment use conventional -e NAME=VALUE arguments.

Create a branch

  1. git checkout master from any folder in your local lykke-website repository
  2. git pull origin master to grab the latest changes
  3. git checkout -b your-branch-name to create a branch

Submit a PR

  1. git add && git commit
  2. git push origin your-branch-name
  3. Go to the Github and submit a PR against master

Folder Structure

General structure is as follows:

.
├── README.md
├── components
│   ├── head.js
│   └── nav.js
├── next.config.js
├── node_modules
│   ├── [...]
├── package.json
├── pages
│   └── index.js
├── static
│   └── favicon.ico
└── yarn.lock

Routing in Next.js is based on the file system, so ./pages/index.js maps to the / route and ./pages/about.js would map to /about.

The ./static directory maps to /static in the next server, so you can put all your other static resources like images or compiled CSS in there.

Out of the box, we get:

  • Automatic transpilation and bundling (with webpack and babel)
  • Hot code reloading
  • Server rendering and indexing of ./pages
  • Static file serving. ./static/ is mapped to /static/

Read more about Next's Routing

License

Content submitted to Lykke website is CC-BY-4.0 licensed, as found in the LICENSE-DOCS.md file.