Skip to content

Commit

Permalink
1.2.15
Browse files Browse the repository at this point in the history
  • Loading branch information
BearJ committed Apr 29, 2022
1 parent 8d732b8 commit 5c96718
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weui.js",
"version": "1.2.14",
"version": "1.2.15",
"description": "weui.js",
"main": "./dist/weui.min.js",
"scripts": {
Expand Down
20 changes: 20 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// app.js
const Koa = require('koa');
const router = require('koa-route');
const ip = require('ip');

const app = new Koa();

const main = ctx => {
ctx.response.body = 'Hello World';
};

const welcome = (ctx, name) => {
ctx.response.body = 'Hello ' + name;
};

app.use(router.get('/', main));
app.use(router.get('/:name', welcome));

app.listen(3001);
console.log('listening on port 3001', ip.address());

0 comments on commit 5c96718

Please sign in to comment.