Skip to content

eddieaviles357/MorNooNights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

MorNooNights News App

Here is a live demo MorNooNights News App

News Articles App.

MorNooNights App displays News from the world or local to you with filtering options. Users must sign up in order to view news articles and recently viewed articles. The API used for this project is TheNewsAPI

The following are required:

  • NodeJS v20.2+
  • ExpressJS v4.18+
  • PostgreSQL v15+
  • PG v8.11+
  • ReactJS v18.2+
  • React Router v6.14.1+

Running the app

First navigate to the backend directory and run the following

npm i

Navigate to frontend directory and run the following

npm i

since we are using webpack 5 we need to modify our webpack.config.js file navigate to node_modules -> react-scripts -> config -> webpack.config.js.

enter the following

// line 305
resolve: {
  fallback: {
    "crypto": require.resolve("crypto-browserify"),
    ...
  }
}
// line 606
plugins: [
    new webpack.DefinePlugin({
    process: JSON.stringify(process.env.NODE_ENV),
  }),
  ...
]
...

Now we can start our app. Enter the following on your terminal. Make sure you are in the right folder (backend or frontend).

npm start

Install PostgreSQL

Make sure to have PostgreSQL installed on your machine before starting. Cd to the backend folder and run the following command on your terminal to seed the database.

psql < mornoonights.sql;

Running test

Make sure to install jest

npm i jest
// or globally
npm install jest --global

and run the following command

jest
// or run individual file
jest <filename>.test.js

to run test for the frontend run the following command

npm run test

PostgreSQL Database Schema

The database schema is very simple. Users and recent, that's it. We will be using TheNewsAPI for fetching our news data.

mnn_db_schema

Home page

Initial page home

Signup page

Create an account signup

Topnews page

Displays the top news of the day topnews

Search news

Filter news by categories or by keywords search


About

MorNooNights news aggregator app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published