Giter Site home page Giter Site logo

news_stand's Introduction

News Stand

The goal of News Stand is to provide users a clean, all-in-one place to find, consume, and comment on the news. News sites are fragmented and RSS feeds don’t allow users to comment, so we want to combine the two.

Our project is built using the MERN stack.

screenshot

Team

  • Katherine Manning
  • Patrick Miner
  • Ayush Kumar
  • Danny Welstad

Table of Contents

  1. Usage
  2. Requirements
  3. Development
    1. Installing Dependencies
    2. Tasks
  4. Roadmap
  5. Contributing

Usage

From the command line, run the following commands:

Clone:

git clone https://github.com/news-stand/news_stand

Navigate Into Repo:

cd news_stand

Install Dependencies:

npm install

Start:

npm run start:dev

Note: This starts the Webpack bundler and Babel transpiler, which run in parallel with nodemon to run your server. You only need one open "running" terminal, rather than three. All three will watch for changes, so you don't need to re-run or re-start any of the processes.

Transpiling / Scripts

Our two main package.json scripts for transpiling our es6 syntax into es5 produciton code are:

"build:server": "babel ./app/server -d build/server",
"build:client": "webpack --config ./webpack.config.js/"

build:client triggers webpack to transpile and bundle all of our client side code into a bundle.js file found inside the build folder.

build:server uses babel to transpile our server side code into the build folder. This is how we are able to use es6 syntax in our server side code. It is important to note that any relative paths used in server-side code are in realtion to the code found in the build folder.

Main Technologies

  • node 8.4.0
  • express
  • mongodb
  • mongoose
  • react
  • react-router
  • material-ui

Development

Installing Dependencies

From within the root directory:

npm install

Setting Environment Variables

This project uses the dotenv module to read and configure environment variables from a .env file. The .env is included in .gitignore and is where you should store your API keys.

# in your root directory, to create the file:
touch .env

The .env reads bash commands, so set environment variables like you would in the terminal.

# for example:
NEWS_KEY=yourKeyHere

At the top of the file where you're using the environment variables (or at the root of your project), import or require the dotenv module and use it to make your variables set in the .env file available to your code.

// in ES5:
var dotenv = require('dotenv');
dotenv.config();

// in ES6:
import dotenv from 'dotenv';
dotenv.config();

You then can access the environment variables in your JavaScript files.

// for example:
search = `https://newsapi.org/v2/everything?q=art&sources=bbc-news&sortBy=popularity&apiKey=${process.env.NEWS_KEY}`

News API

This project uses information from NewsAPI. For development, you'll need an API key that you set in your environment variables.

Endpoints:

Roadmap

View the project roadmap here

Contributing

See CONTRIBUTING.md for contribution guidelines.

news_stand's People

Contributors

ayushkumar26 avatar goontwo avatar katm201 avatar pjminer3 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.