Get Latest Articles Scraped off Your Favourite Blog
This application uses data scrapped off the ArsTechnica Blog. Article attributes such as Title, Tagline, Author, Published Date, and Web URL to the particular article are grabbed and stored in a SQLite3 DB. Using Sinatra for Backend data manipulation and React for Frontend presentation, the data is then presented to the user where CRUD operations can be performed on the displayed information and in effect propagated to the DB.
GET
Retrieve all Article(s), Review(s), and Reader(s) from SQLite3 DB
Endpoints:
BASE_URL/articles
BASE_URL/articles/:id
BASE_URL/reviews
BASE_URL/reviews/:id
BASE_URL/readers
BASE_URL/readers/:id
-
GET
Search Articles by Title -
POST
Add Article and its attributes to the SQLite3 DB -
PATCH/PUT
Edit Article Attributes and propagate changes to SQLite3 DB -
DELETE
Delete an Article Entry from the SQLite3 DB
Fork and clone this repo.
Frontend: Run npm install && npm start
and open http://localhost:3000.
Backend: Run bundle install
to install required gems, then run bundle exec rake server
to start up the server on [http://localhost:9292]
NOTE:
- For first time initialization, run
bundle exec db:seed
to retrieve latest Articles and store them in SQLite3 DB. - If port fails to initialize, run
kill -9 $(lsof -ti:9292)
to free up associated port.
GET
: Retrieve all Article(s), Review(s), and Reader(s) from SQLite3 DBPOST
: Add new Articles to Article collection and SQLite3 DBPATCH/PUT
: Edit Article entries and propagate changes to SQLite3 DBDELETE
: Remove Articles from Article collection and SQLite3 DB- Search for Articles from Article collection
This is the main repository that handles all frontend operations.
Frontend Netlify live link
Used the provided Backend Setup template to generate backend code. Facilitates faster deployment of generated JSON data to Heroku.
Backend Heroku live link
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
To learn React, check out the React documentation.
This project is licensed under the MIT License