Giter Site home page Giter Site logo

anhtumai / blog-list-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 200 KB

Backend for Blog-list project in Fullstack Open course provided by University of Helsinki 2021

Home Page: https://blog-list-backend.herokuapp.com/api/blogs

TypeScript 99.59% JavaScript 0.41%
expressjs typescript jest babel mongoose mongodb heroku tdd-typescript

blog-list-backend's Introduction

Blog list

Backend for blog list project for course fullstack open 2021. Written in Express (TypeScript)

Practice TDD on backend development

Public link

Login

/api/login - POST

  • Perform login with username and password. Get a bearer token after successful login.

  • Params: username, password

Blogs

/api/blogs - GET

  • View all records table (url, author, title, likes)

/api/blogs/<string:blog_id> - GET

  • View single blog record by ID

/api/blogs - POST

  • Add new blog record
  • Params: url, author, title, likes (optional)

/api/blogs/<string:blog_id> - DELETE

  • Delete blog record by ID

/api/blogs/<string:blog_id> - PUT

  • Update blog record by ID
  • Params: url, author, title, likes (optional)

Users

/api/users - GET

  • View all records table (username, name)

/api/users - POST

  • Add new user record
  • Params: username, name, password

Running program

npm i

// Run the test cases
npm run test

// Run the main program
npm start

TDD workflow

  • Implement "basic" test cases for new feature. These tests should fail.
  • Implement new feature.
  • Fix both source code and test cases (test cases are code after all) along with testing.
  • When tests pass, add new tests for edge cases.
  • Refractor and test continuosly until all test cases pass

blog-list-backend's People

Contributors

anhtumai avatar

Watchers

 avatar  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.