Giter Club home page Giter Club logo

komalsingh54 / hacker-news Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 491 KB

Hacker News is a community started by Paul Graham for sharing "Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity."

Home Page: https://hacker-news-p.herokuapp.com/

JavaScript 89.42% CSS 8.72% Dockerfile 0.63% Shell 1.22%
hacker-news react-ssr express express-js circleci heroku heroku-deployment docker docker-compose nodejs

hacker-news's Introduction

Hacker News

โš› Hacker News - React + Express + CI/CD + Heroku

TOC

Motivation

Hacker News is a community started by Paul Graham for sharing "Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity."

Goals

My goal is to provide a well-tested, regularly maintained, easily configurable and adjustable this Project with support for server side rendering that gives a good basis to start own project on. As minimal as possible with as much functionality as necessary.

Screenshot

Features

This project has out-of-the-box support for the following things:

  • General Setup

    • ๐Ÿ”ฅ Babel 7
    • ๐Ÿ“ฆ Webpack 4
    • ๐Ÿ”ฅ ESLint 6 (with a set of custom rules which may be mostly identical to AirBnB with some personal flavor added)
    • ๐Ÿ”ฅ Prettier
    • ๐Ÿ”ฅ Jest 24
    • ๐Ÿ React Testing Library
    • โœ… Server Side Rendering with Express
    • โœ… Hot Module Reloading (HMR)
    • โœ… CSS Modules
    • โœ… PostCSS
    • โœ… Precommit hooks via lint-staged + Husky
    • โœ… Optional static deployment without the need for Node.js on the server
    • โœ… CI/CD using Circle/CI
    • โœ… Deployment on Heroku
  • Libs and Dependencies

    • โš› React 16.x (latest), with Hooks!
    • โœ… Redux + Thunk middleware
    • โœ… Reselect
    • โœ… React Router 5
    • โœ… React Helmet

Installation

As a general recommendation you should create a fork of this project first or use GitHub's function so you can adjust it to your own needs, add all the dependencies you need and commit everything back into your own repository.

Once you've forked the repository here on Github, clone it, cd into the directory and run yarn (or npm install) on your command line to install all the dependencies. You're ready to go now!

Usage

There are npm scripts for all the relevant things. The server will always be started on port 54370 unless otherwise specified in process.env.PORT. You can use a .env file to specify env vars. If you want to use them in your client side code, don't forget to add them in ./.env.

Noteworthy scripts:

yarn dev

Starts the app in development mode: creates a new client and server dev build using webpack, starts the Express server build (for both file serving and server side pre-rendering) and keeps webpack open in watchmode.

yarn build

Creates a new build, optimized for production. Does not start a dev server or anything else.

yarn test

Run all tests using jest.

yarn lint:js

Run ESLint for all JavaScript and TypeScript files

yarn lint

Run lint:js and lint:css in parallel

yarn analyze

Starts webpack-bundle-analyzer to give you the opportunity to analyze your bundle(s)

By - Komal Singh

License

MIT.

hacker-news's People

Contributors

komalsingh54 avatar

Watchers

 avatar  avatar

Forkers

todokku

hacker-news's Issues

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.