├── now.json ├── .env.development ├── .env.production ├── .stylelintignore ├── sandbox.config.json ├── .stylelintrc ├── src ├── client │ ├── constants │ │ └── url.js │ ├── components │ │ ├── loading │ │ │ └── index.js │ │ ├── not-found │ │ │ └── index.js │ │ ├── redirect-with-status │ │ │ └── index.js │ │ ├── status │ │ │ └── index.js │ │ ├── layout │ │ │ └── index.js │ │ ├── comment │ │ │ └── index.js │ │ └── article │ │ │ └── index.js │ ├── entry │ │ ├── models │ │ │ ├── index.js │ │ │ └── news.js │ │ ├── index.js │ │ ├── routers.js │ │ ├── app.js │ │ └── index.scss │ ├── lib │ │ └── util.js │ └── containers │ │ └── home │ │ ├── feed │ │ └── index.js │ │ ├── detail │ │ └── index.js │ │ └── user │ │ └── index.js ├── shared │ ├── lib │ │ └── http │ │ │ ├── index.js │ │ │ ├── client.js │ │ │ └── server.js │ └── service │ │ └── news.js ├── server │ ├── app.js │ ├── views │ │ └── home.njk │ └── server.js └── .babelrc.js ├── scripts └── webpack │ ├── config │ ├── webpack.config.parts │ │ ├── index.js │ │ ├── alias.js │ │ ├── load_js.js │ │ └── load_css.js │ ├── createConfig.js │ ├── paths.js │ ├── webpack.config.client.js │ ├── webpack.config.base.js │ ├── webpack.config.server.js │ └── env.js │ └── build.js ├── .eslintrc ├── .gitignore ├── package.json └── README.md /now.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | PORT=4000 -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | PORT=4000 -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | src/client/entry/index.scss -------------------------------------------------------------------------------- /sandbox.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "template": "node" 3 | } -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard" 3 | } 4 | -------------------------------------------------------------------------------- /src/client/constants/url.js: -------------------------------------------------------------------------------- 1 | export const serverUrl = 'https://hacker-news.firebaseio.com/v0'; 2 | -------------------------------------------------------------------------------- /src/shared/lib/http/index.js: -------------------------------------------------------------------------------- 1 | import client from './client'; 2 | import server from './server'; 3 | 4 | export default (__BROWSER__ ? client : server); 5 | -------------------------------------------------------------------------------- /src/client/components/loading/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default class Loading extends React.Component { 4 | render() { 5 | return
9 |
10 | 14 | 15 | {item.title} 16 | 17 | ({Util.domain(item.url)}) 18 |
19 |20 | 21 | {item.score} points by{' '} 22 | {item.by} 23 | 24 | {Util.relativeTime(item.time)} 25 | 26 | |{' '} 27 | 28 | {item.descendants} comments 29 | 30 | 31 |
32 |No comments yet.
} 22 |
31 |
32 | submissions
33 |
34 |
35 |
36 | comments
37 |
38 |