Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.gitignore
README.md
node_modules/
dist/
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:carbon-alpine
WORKDIR /www
COPY . /www
VOLUME ./:/www
RUN npm install
CMD npm run build && npm start
73 changes: 49 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="https://user-images.githubusercontent.com/12621342/35959365-41f352b0-0ce0-11e8-8a5b-05ad054ea378.png">
</p>

> The node version of github-profile-summary which is inspired by tipsy' [github-profile-summary](https://github.com/tipsy/github-profile-summary)
> The node version of github-profile-summary which is inspired by tipsy's [github-profile-summary](https://github.com/tipsy/github-profile-summary)

Site: https://gh-profile-summary.teamsz.xyz

Expand All @@ -13,22 +13,42 @@ Site: https://gh-profile-summary.teamsz.xyz
- Vue
- Chart.js
- Koa
- Github graphql api
- now.sh
- GitHub GraphQL API

## Screenshot

### Cool & beautiful profile list

![](https://user-images.githubusercontent.com/12621342/35951697-89e3338e-0cb7-11e8-9986-dc258f257b97.png)

### Share system & Save your profile as Image
### Share system & save your profile as an image

![](https://user-images.githubusercontent.com/12621342/35951773-d1c9cf50-0cb7-11e8-80b2-08ae7d876533.png)

## Setup

First, generate a token over at: https://github.com/settings/tokens

Then you need to create a `.env` file in the project folder.

The `.env` file looks like this:

```env
GH_TOKEN = Your token here
JWT_SECRET = Any string
KOA_PORT = 8888
HTTPS = false
```

> KOA_PORT can be any available port that you like.

**If you set `HTTPS = true`, then the websocket will connect via port 443. This is particularly useful for https production.**

## Local run

> You need to have node environment!
### Node.js

> You need to have a node environment!

### Install

Expand All @@ -38,45 +58,50 @@ cd node-github-profile-summary
npm install # or yarn
```

### Setup
### Run

First generate a token at https://github.com/settings/tokens
```bash
npm run build
npm start
```

Then You need to create a `.env` file in the project folder.
**Notice:** `8888` is the `KOA_PORT` in the `.env` file.

The `.env` file looks like:
Access the application via: http://localhost:8888

```env
GH_TOKEN=Your token here
JWT_SECRET=Any string
KOA_PORT=8888
HTTPS=false
```
Done.

### Docker

> KOA_PORT can be any port you like which is available.
> You need to have a docker environment!

**If you set `HTTPS=true`, then the websocket will connect the 443 port, it's useful for https production.**
### Build

```bash
docker build -t github-profile .
```

### Run

```bash
npm run build
npm start
docker run -it --rm --name github-profile -p 8888:8888 github-profile
```

And then open the link `http://localhost:8888`, Done.
**Notice:** `8888` is the `KOA_PORT` in the `.env` file.

Access the application via: http://localhost:8888

Done.

## TODOS

- More useful charts
- Docker support
- ~~Docker support~~
- ...


## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2018 Molunerfinn


Copyright (c) 2019 Molunerfinn
1 change: 1 addition & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"version": 1,
"env": {
"GH_TOKEN": "@gh-summary-token",
"JWT_SECRET": "@jwt-secret"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"dotenv": "^5.0.1",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export default {
width calc(100% - 56px)
word-wrap: break-word
line-height: 20px
padding-left 4px
padding-right 4px
&.small-text
font-size 16px
&-status
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,10 @@ dotenv@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"

dotenv@^5.0.1:
version "5.0.1"
resolved "http://registry.npm.taobao.org/dotenv/download/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"

duplexer@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
Expand Down