Welcome to News Flash! This project gives you access to high quality, cutting edge news from sources worldwide. It is also designed to be intuitive and easy to use, all with a great, responsive UI. To see a live version of this project, please visit this link.
This project uses a host of modern technologies. The core ones are:
-
ECMAScript 6: Also known as ES2015, this is the newest version of Javascript with next-generation features like arrow functions, generators, enhanced object literals, spread operators and more. See this link for details.
-
NodeJS: NodeJS is a server-side JavaScript runtime engine built on Chrome's V8 JavaScript engine. It is lightweight, efficient and greatly used in building web apps. Please visit this link for more details.
-
React and ReactDOM: These were developed by Facebook and are used for building web pages that are structured as a collection of components. These components are kept as independent as possible. See this link.
-
The Flux architecture: This is a design architecture for building stable web apps with, among other things, a unidirectional flow of data. See this link for details.
-
Firebase: This project makes use of various components of the Firebase suite, including Firebase Authentication.
Here are the steps you need to follow to run this project on your computer:
-
Install NodeJS: You may visit this link for complete instructions on installing NodeJS on your computer.
-
Open a terminal/command prompt on your computer and
cd
into your preferred path/location. -
Clone this repo: Enter this command in the terminal:
git clone https://github.com/andela-foladipo/news-flash-cp1.git
- Install dependencies: Do so by running the following command:
npm install
Note: npm
is a component of NodeJS that serves as its package manager. So, it comes along with installing NodeJS.
-
Create a Firebase project: This project uses Firebase Authentication Admin SDK on the server for user authentication, so you'll need to create a Firebase project. Please visit this link for instructions on creating a Firebase project and this link for how to add the Firebase Authentication Admin SDK to your project. The latter will make you download a file that contains the private key for your Admin SDK account. Take careful note of where you save it.
-
Configure the project with your Admin SDK: In the root of this project, create a directory/folder and name it
privateFiles
. Then, move the file with your Admin SDK private key (from the step above) into that directory/folder and rename the filefirebaseAdminServiceAccount.json
. -
Build the project: This will compile all the project's source code into HTML, CSS and JS files. In the terminal/command prompt, enter the following command:
npm run build
- Run the project: This will run the project on your computer so that you can browse it yourself. In the terminal/command prompt, enter the following command:
npm start
- Open a web browser of your choice and visit
http://localhost:5000
. Voila! It's alive!
- What if I want to use another port?
That's easy. In the root of the project. create a file named .env
and add the following line to it:
PORT=<your_desired_port>
where <your_desired_port> is the port you want to use. So, if you want to use port 8080
, you will write:
PORT=8080
This project is authored by Folusho Oladipo and is licensed for your use, modification and distribution under the MIT license. Feel free to hack, extend and share it!