/service

A micro web service monorepo setup using lerna / Front-end toolkit

Primary LanguageTypeScriptMIT LicenseMIT

service

A micro web service monorepo setup using lerna / Front-end toolkit

  • (Latest ver: 2/20/2020 AM 09:50)

Usage

$ git clone https://github.com/myungjaeyu/service.git && cd service

$ yarn install

$ yarn boot

$ yarn start

# client
# http://localhost:3000

# api proxy
# http://localhost:3000/api/github/myungjaeyu

# api
# http://localhost:3001/api/github/myungjaeyu

# storybook
# http://localhost:9009

$ yarn build

$ yarn serve
# http://localhost:8080
# http://localhost:8080/api/github/myungjaeyu

$ yarn serve-ui
# http://localhost:9009

$ yarn lint

Deploy in UI Storybook Dev Server

https://storybook-static-pi.now.sh

# deploy

$ yarn build

$ yarn deploy-ui

Packages

dependencies

shared

prettierrc.json

{
    "printWidth": 200,
    "semi": false,
    "singleQuote": true,
    "jsxSingleQuote": true,
    "arrowParens": "always",
    "tabWidth": 4
}

Directory Structure

service/
│
├── storybook-static/ # (design-system)
│
├── dist/ # (api, client)
│
├── packages/
│   ├── api/
│   ├── client/
│   └── design-system/
│
└── package.json

API

    express
    prerender-node

Client

    react
    react-router-dom
    react-meta-tags
    react-hook-form
    react-use

    unstated-next # state mgmt

    js-cookie
    query-string
    i18next

    @emotion/styled
    bootstrap4 # index.html cdn
    fontawesome5 # index.html cdn

    less
    postcss
    babel7

    analytics

Design-system

    react
    react-use

    classnames

    @emotion/styled
    bootstrap4 # preview-head.html cdn
    fontawesome5 # preview-head.html cdn

    # addons
    @storybook/addon-actions
    @storybook/addon-storysource
    @storybook/addon-viewport
    @storybook/addon-info

Copyright © 2020 Myungjae Yu


Docker Container

$ yarn build

$ docker-compose build && docker-compose up

# http://localhost:5000

Serverless AWS Lambda & CloudFront

$ serverless deploy

SCP

$ zip -r service.zip . && scp -i [pem key] service.zip root@127.0.0.1:~/blah/blah

License

MIT license.