Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A half year at Merpay

A half year at Merpay

Shingo Sato

July 03, 2019
Tweet

Other Decks in Technology

Transcript

  1. export function denyProduction({ env, error }: Context) { if (env.APP_ENV

    === 'production') { return error({ statusCode: 404 }); } }
  2. export function staticAssetsAccessControl(this: any, moduleOptions: ModuleOptions) { this.nuxt.hook('render:setupMiddleware', (app: Server)

    => { app.use((req: http.IncomingMessage, res: http.ServerResponse, next: (err?: any) => void) => { const { pathname } = parseUrl(req.url); if (/* check the `pathname` */) { return options.denyCallback(res); } return next(); }); });
  3. jobs: upload_sourcemap: executor: sentry_cli steps: - checkout - attach_workspace: at:

    *workspace_root - run: shell: /bin/bash -euo pipefail command: | RELEASE_NAME=$(cat ./package.json | jq -r .version) URL_PREFIX=https://static-coupon.merpay.com/nuxt sentry-cli --auth-token=${SENTRY_AUTH_TOKEN} releases files ${RELEASE_NAME} \ upload-sourcemaps .nuxt/dist/client --no-rewrite --url-prefix=${URL_PREFIX}