Skip to content

alitariksahin/Article-API

Repository files navigation

Article-API

This project aims to create an interactive database for various articles.
Here is the link: https://article-api-ats.onrender.com (initially it may take up to 30 seconds to render the site since it is deployed on a free service)

Technologies used in this project

Server side is built on Node.js/Express and powered with mongoDB
Client side is made with Node.js/EJS

Functionality of the project

  • All of the data is stored in my server on mongoDB. Also, I created a REST API which has access to this server and data.
    Besides I added some further functionality to be able to manipulate data.
  • You can access this REST API via this extension "/articles" and you can apply all the crud operations by sending requests to
    "/articles" and "/articles/:id".
  • In order to make these accesses more flexible, I decided to add a useful client side and made an easy to use website on the same
    domain. In this web page I allowed all the users to manipulate the data like adding, editing, deleting.
  • In this way, users are granted two way of accessing and manipulating the data in my API: one is through the web page, and the other
    is through requests they make via their applications or code.

Structure of the code

My code structure includes both client-side work and server-side work, but they work seperately.
By refactoring I carried all the heavy work of server side to controllers. Server-side-routes gather the request made externally and
pass the to controllers to handle.
On the other side, Client-side-routes handle request made on webpage and almost all the work is passed to the server side through
middlewares, so website works clean and properly. Finally, ejs codes in views folder helps web pages to be dynamic and responsive.

About

A clean api for articles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published