nolawi / nextjs-message-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NextJS message app

Getting Started

To get started, simply clone the repository and run npm install

# Clone the repo
git clone https://github.com/nolawi/nextjs-message-app.git

# Move into the new directory
cd nextjs-message-app/

# Install npm packages
npm install

# Start up the next.js dev server, browse to http://localhost:3000/
npm start

Todo

  • figure out what nextjs does?
  • Show form index page
  • /api/guestbook
  • fetch
  • pages guestbook/ home views
  • fetchmessage
  • navigation
  • bootstrap (bonus)
  • Code linting (bonus)
  • resets with a success message
  • Form/show an error
  • Unit tests (bonus)

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 99.4%Language:CSS 0.6%