Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active July 31, 2017 18:47
Show Gist options
  • Select an option

  • Save rogerwschmidt/3954c8f4335e3dedc970f947f21cf246 to your computer and use it in GitHub Desktop.

Select an option

Save rogerwschmidt/3954c8f4335e3dedc970f947f21cf246 to your computer and use it in GitHub Desktop.

Express and Knex Instructor Notes

Objective

  • Explain what a RESTful, database-driven HTTP server is.
  • Explain why a RESTful, database-driven HTTP server is useful.
  • Use Express and Knex to build a RESTful, database-driven HTTP server.

What is a RESTful, database-driven HTTP server?

Turn to your neighbor and discuss what a RESTful, database-driven HTTP server is. Be prepared to share your answer.

Why is a RESTful, database-driven HTTP server is useful?

Turn to your neighbor and discuss why a RESTful, database-driven HTTP server is useful. Be prepared to share your answer.

Use Express and Knex to build a RESTful, database-driven HTTP server.

  • What is stored in the knexfile.js? Is the name important? Is the location important?
  • What is stored in the knex.js file? Is the name important? Is the location important?
  • What file do you require in a file when you want to use the database?
  • When creating routes in a separate file, to which object do you attach your new route to? How do you get that object? What do you export?
  • How do you add routes that are defined in another file to your express application?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment