commit 64711da9c567022eff48a5bb0b19c305c77c26f8 Author: Ruidy Date: Fri Feb 19 11:49:48 2021 +0100 init setup diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f8d9cfd --- /dev/null +++ b/.vscode/settings.json @@ -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" + } +} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3fcc48b --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +.PHONY: run +run: + deno run --watch --unstable src/index.ts +tests: + deno test \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..776f797 --- /dev/null +++ b/README.md @@ -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 diff --git a/src/index.test.ts b/src/index.test.ts new file mode 100644 index 0000000..74d6752 --- /dev/null +++ b/src/index.test.ts @@ -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); +}); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..e7b8ae7 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,4 @@ +const main = () => "hello"; + +console.log(main()); +export default main;