From 64711da9c567022eff48a5bb0b19c305c77c26f8 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Fri, 19 Feb 2021 11:49:48 +0100 Subject: [PATCH] init setup --- .vscode/settings.json | 14 ++++++++++++++ Makefile | 5 +++++ README.md | 9 +++++++++ src/index.test.ts | 8 ++++++++ src/index.ts | 4 ++++ 5 files changed, 40 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 Makefile create mode 100644 README.md create mode 100644 src/index.test.ts create mode 100644 src/index.ts 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;