init setup

This commit is contained in:
Ruidy 2021-02-19 11:49:48 +01:00
commit 64711da9c5
5 changed files with 40 additions and 0 deletions

14
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"deno.enable": true,
"deno.unstable": true,
"deno.lint": true,
"deno.import_intellisense_origins": {
"https://deno.land": true
},
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescriptreact]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}

5
Makefile Normal file
View file

@ -0,0 +1,5 @@
.PHONY: run
run:
deno run --watch --unstable src/index.ts
tests:
deno test

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# Hello Server
Web app which returns the iconic Hello, World in various locales
## Features
- [ ] Print hello world in a random locale
- [ ] Select the locale by id
- [ ] Serve via internet

8
src/index.test.ts Normal file
View file

@ -0,0 +1,8 @@
import { assertStrictEquals } from "https://deno.land/std@0.87.0/testing/asserts.ts";
import main from "./index.ts";
Deno.test("Hello test", () => {
const actual = main();
const expected = "hello";
assertStrictEquals(actual, expected);
});

4
src/index.ts Normal file
View file

@ -0,0 +1,4 @@
const main = () => "hello";
console.log(main());
export default main;