Skip to content

Demo app that uses Next.js for server-side rendering of React Components

License

Notifications You must be signed in to change notification settings

onready/demo-next.js

Repository files navigation

Demo Next.js

Greenkeeper badge

This is a sample app that uses Next.js for server-side rendering of React components.

What does this demo do?

This is a web application that fetchs data from ICNDb.com.

There are two pages:

  • A home page (/), with a infinite scroll of Chuck Norris's jokes.
  • A search page (/search), which has a form for search jokes by a numeric id.

How do I run it?

First, execute npm install at the root of the project to download dependencies.

Then, to run the app:

  • For development:

    npm run dev
    
  • For production:

    npm run build
    npm run start
    

The app will be available at localhost:3000

Docker

To build de Docker Image, run the next command:

docker build . -t "demo-next-js"

Then, to run the container:

docker run -d -p 3000:3000 demo-next-js

Alternatively, you can pull our Docker Image:

docker pull onready/demo-next.js 

Additional libraries