Skip to content
Myr

Feature/example blog (#39)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Add blog CRUD example * Fixed some * Exclude example test

authored by Yusuke Wada · committed by GitHub · parent 4a795da · Browse files · 12 files+287 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

12 files+287 added−4 removed

  • tests:+76 added−0 removed
  • other:+211 added−4 removed

12 files+287 added−4 removed

added:example/blog/src/controller.test.ts+76 added
added:example/blog/src/controller.ts+51 added
added:example/blog/src/index.ts+14 added
added:example/blog/src/model.ts+53 added
added:example/blog/.gitignore+5 added
1dist2node_modules3worker4package-lock.json5yarn.lock
added:example/blog/jest.config.js+7 added
added:example/blog/package.json+30 added
added:example/blog/README.md+13 added
added:example/blog/tsconfig.json+23 added
1{2 "compilerOptions": {3 "target": "es2017",4 "module": "commonjs",5 "rootDir": "src",6 "outDir": "./dist",7 "allowJs": true,8 "strict": true,9 "esModuleInterop": true,10 "skipLibCheck": true,11 "types": [12 "@cloudflare/workers-types",13 "@types/jest",14 "@types/service-worker-mock"15 ]16 },17 "include": [18 "src/**/*"19 ],20 "exclude": [21 "node_modules",22 ]23}
added:example/blog/webpack.config.js+4 added
1module.exports = {2 target: 'webworker',3 entry: './dist/index.js',4}
added:example/blog/wrangler.toml+9 added
1name = "hono-example-blog"2type = "webpack"3route = ''4zone_id = ''5usage_model = ''6compatibility_flags = []7workers_dev = true8compatibility_date = "2022-01-09"9webpack_config = "webpack.config.js"
modified:jest.config.js+2 added-4 removed
1module.exports = {2 testMatch: [3 '**/test/**/*.+(ts|tsx|js)',4 '**/src/**/(*.)+(spec|test).+(ts|tsx|js)',5 ],2 testMatch: ['**/test/**/*.+(ts|tsx|js)', '**/src/**/(*.)+(spec|test).+(ts|tsx|js)'],3 transform: {4 '^.+\\.(ts|tsx)$': 'ts-jest',5 },6 testPathIgnorePatterns: ['./example'],7}