kthjm / pb-noa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

personal boilerplate for next/koa

Custom Koa Server example

ctx.respond

next.js

directory

app.getRequestHandler() / handleRequest(req, res, parsedUrl)

index.js#L86

app.render(req, res, pathname, query, parsedUrl)

index.js#L293

heroku

If a yarn.lock file is detected in the root of the project, yarn is used for installing dependencies and running scripts. Otherwise, npm is used.

We set NPM_CONFIG_PRODUCTION to true by default to install production dependencies only. If you would like to install devDependencies, you can disable production mode.

However, since you usually don’t want all development dependencies in your production builds, it’s preferable to move only the dependencies you actually need for production builds (bower, grunt, gulp, etc) into dependencies.

参考: "sh: 1: ./node_modules/.bin/babel: not found" while deploying to heroku #6281

Heroku does not install dev dependencies since the server counts as "production" by default

dependenciesbabel-*を入れる形になった。

circleci

jobs are a collection of Steps. steps are a collection of executable commands which are run during a job. https://circleci.com/docs/2.0/sample-config/

workflows are sets of rules for defining a collection of jobs and their run order that shortens the feedback loop. https://circleci.com/docs/2.0/workflows/#overview

Note: CircleCI 2.0 does not yet support seamlessly integrated Heroku and AWS deployments. Keys and configuration added to the Heroku Deployment and AWS CodeDeploy pages in CircleCI are currently not available to 2.0 jobs. https://circleci.com/docs/2.0/project-walkthrough/#deploying-to-heroku

About


Languages

Language:JavaScript 100.0%