bzle / nextjs-guestbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nextjs-challenge-boilerplate

A basic boilerplate for nextjs challenge

You are responsible for writing a node app using nextjs. Your app will consist of two pages (a form, and a feed), and a server that reads and writes to the feed.

Challenge: Create a new Github project with NextJS and React that meets the following criteria:

  1. Starts with the command npm i && npm dev
  2. Shows a form with “name” and “message” when it runs at localhost:3000
  3. When submitting form, runs a POST to /api/guestbook and resets with a success message (should show an error if things are missing).
  4. A link on the homepage takes you to /guestbook and shows all posts that have been submitted from the previous form.
  • A link on that page exists to go back to the homepage
  • You do not need to persist that data in any database, just keep it in memory.
BONUS

Feel free to add the following

  1. Add some UI/UX features
  2. Unit tests (coverage)
  3. Code linting

About


Languages

Language:JavaScript 75.7%Language:CSS 24.3%