mirror of
https://github.com/rjNemo/deno_hello
synced 2026-06-06 01:56:40 +00:00
init setup
This commit is contained in:
commit
64711da9c5
5 changed files with 40 additions and 0 deletions
14
.vscode/settings.json
vendored
Normal file
14
.vscode/settings.json
vendored
Normal 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
5
Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.PHONY: run
|
||||
run:
|
||||
deno run --watch --unstable src/index.ts
|
||||
tests:
|
||||
deno test
|
||||
9
README.md
Normal file
9
README.md
Normal 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
8
src/index.test.ts
Normal 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
4
src/index.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const main = () => "hello";
|
||||
|
||||
console.log(main());
|
||||
export default main;
|
||||
Loading…
Reference in a new issue