GithubHelp home page GithubHelp logo

mianhaseeb1 / example-frontend-next-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sanity-io/example-frontend-next-js

0.0 1.0 1.0 273 KB

An example of a Sanity powered frontend using Next.js

Home Page: https://example-frontend-next-js.sanity-io.now.sh

JavaScript 100.00%

example-frontend-next-js's Introduction

Sanity + Next.js frontend example

DEMO ๐Ÿ‘‰ https://example-frontend-next-js.sanity-io.now.sh

This is an example Sanity powered frontend for the movie dataset using Next.js.

Prerequisites

You will need Node.js version 8.0 or greater installed on your system.

Setup

Get the code by either cloning this repository using git

git clone https://github.com/sanity-io/example-frontend-next-js.git

... or downloading source code code as a zip archive.

Once downloaded, open the terminal in the project directory, and install dependencies with:

npm install

If you're running your own Sanity project with the example movie dataset, go to lib/sanity.js and change the following lines:

  projectId: 'YOUR_PROJECT_ID',
  dataset: 'NAME_OF_YOUR_DATASET',

You can locate the ID of your project in the header of the management page for your project.

You also need to enable localhost:3000 in your CORS Origins settings! Either through the management page under settings or by running the below in the project folder you set up with sanity init:

sanity cors add http://localhost:3000

Then start the example app with:

npm run dev

The app should now be up and running at http://localhost:3000 ๐Ÿš€

example-frontend-next-js's People

Contributors

bjoerge avatar kristofferjs avatar evenwestvang avatar kmelve avatar shaswatsaxena avatar timneutkens avatar

Watchers

James Cloos avatar

Forkers

nirvananimbusa

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.