Hello worlds

flask

flaskhello flask
1
2
3
4
5
6
7
8
9
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello World!'

if __name__ == '__main__':
app.run()

micro

microhello micro
1
2
3
4
5
6
const sleep = require('then-sleep')

module.exports = async (req, res) => {
await sleep(500)
return 'Ready!'
}

express

expresshello express
1
2
3
4
5
6
7
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`Example app listening on port ${port}!`))

feathers

feathershello feathers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const feathers = require('@feathersjs/feathers');
const app = feathers();

// Register a simple todo service that returns the name and some text
app.use('todos', {
async get(name) {
// Return an object in the form of { name, text }
return {
name,
text: `You have to do ${name}`
};
}
});

// A function that gets and logs a todo from the service
async function getTodo(name) {
// Get the service we registered above
const service = app.service('todos');
// Call the `get` method with a name
const todo = await service.get(name);

// Log the todo we got back
console.log(todo);
}

getTodo('dishes');

eggjs

eggjshello eggjs
1
2
3
4
5
6
7
8
9
const Controller = require('egg').Controller;

class HomeController extends Controller {
async index() {
this.ctx.body = 'Hello world';
}
}

module.exports = HomeController;

nestjs

nestjshello nestjs
1
2
3
4
5
6
7
8
9
import { Controller, Get, Req } from '@nestjs/common';

@Controller('cats')
export class CatsController {
@Get()
findAll(@Req() request) {
return 'This action returns all cats';
}
}

use a new hexo theme

A hexo theme list from zhihu

  • 第一名:’iissnan/hexo-theme-next’, 470星 https://github.com/iissnan/hexo-theme-next 。预览:http://notes.iissnan.com/
  • 第二名:TryGhost/Casper, 439星 or kywk/hexo-theme-casper 44星。后面一个主题是基于前面一个主题。
  • 第三名:daleanthony/uno,352星 or someus/huno, 31星。
  • 第四名:orderedlist/modernist, 286星 or heroicyang/hexo-theme-modernist,98星
  • 第五名:litten/hexo-theme-yilia, 265星
  • 第六名:A-limon/pacman, 243星
  • 第七名:AlxMedia/hueman, 215星 ppoffice/hexo-theme-hueman, 71星
  • 第八名:kathyqian/crisp-ghost-theme, 214星,guolin/crisp-hexo-theme, 4星
  • 第九名:xiangming/landscape-plus, 147星,hexojs/hexo-theme-landscape, 34星,官方landscape主题及其优化
  • 第十名:wuchong/jacman, 136星,基于Pacman。