Code Monkey home page Code Monkey logo

mark-sql-proj--guestbook's Introduction

GuestBook

Creative Commons License

This is part of Academy's technical curriculum for The Mark. All parts of that curriculum, including this project, are licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

What's this?

This is starting code for a very simple guestbook API, inspired by a similar one in the http conventions project, but simpler.

It is not currently working - you must fix it by adding code to execute queries read from and write to the database, using the node-postgres ('pg') library.

Setup

  • Create a database called guestbook
sudo -u postgres createdb guestbook
  • In that new database, run the commands in db/create_tables.sql, to create a table.
  • Run yarn to install the project dependencies!
  • Run with yarn start:dev

What's in a 'signature' ?

  • When the API user sends a signature it should contain two strings:

    • name (a mandatory string, such as 'Grace Hopper')
    • message (an optional string, such as 'Hello World')
  • When the API returns signatures from the database, the signatures will also contain:

    • id: an integer
    • time: a timestamp describing when this signature was added to the guestbook.

Tasks

Find all the lines of code that have the comment //FIXME-TASK

At each of these locations, write code to execute SQL commands to read from, insert, update, or delete table rows in the database, as appropriate.

Testing

Test your server manually with Postman.

There is a Postman collection file in this repo, here. Optionally, this can be imported into Postman to quickly give you some requests to use in testing. Or you can just create Postman requests as normal.

mark-sql-proj--guestbook's People

Contributors

nbogie avatar maryamreis avatar

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.