donnyburnside / universal.js

Minimal boilerplate for creating universal javascript applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uni.js

Minimal boilerplate for creating universal javascript applications.

Table of Contents

Features

  • React - powerful, interactive user interfaces
  • Universal Rendering - shared code that can render on the server and in the browser
  • CSS Modules - locally scoped css prevents styles from clashing
  • SEO friendly - By rendering initial requests server-side, search engines have a fully hydrated html page to parse

At last, we can create seo friendly applications with javascript

Universal Rendering

  • For the first request, the server handles the rendering of the application. If the current React component relies on data that it must fetch asynchronously, the server can handle this request for you. This let's us fully hydrate a React component before rendering it to the browser.
  • Any sub-sequent requests to the server are handled by the browser, giving us that lovely SPA feel.
  • Finally, we can construct SEO-friendly javascript applications.

Getting Started

  • Clone or download and extract the repo
  • Open the directory in your terminal and run npm install
  • That's it, you're ready to begin. Check out the commands section below for what to do next.

Commands

Command Description
npm run dev Start app in development mode
npm start Start app in production mode
npm run watch-client Watch client-side code for changes
npm run watch-server Watch server-side code for changes
npm run clean Clean app directory by removing compiled files

Contributors

About

Minimal boilerplate for creating universal javascript applications.


Languages

Language:JavaScript 97.5%Language:CSS 2.5%