expressjs project template

This commit is contained in:
2022-05-23 02:26:12 +00:00
parent 500dc831cb
commit e839349d3e
8 changed files with 82 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
{
"name": "kiss-express",
"description": "Make ExpressJS websites with Kisslang",
"classPath": "src/",
"dependencies": {
"kiss": ""
},
"url": "https://github.com/NQNStudios/kisslang",
"contributors": [
"NQNStudios"
],
"version": "0.0.0",
"releasenote": "",
"tags": [],
"license": "LGPL"
}

View File

@@ -0,0 +1,3 @@
node_modules/
.haxelib/
index.js

View File

@@ -0,0 +1,8 @@
-lib kiss
-lib express
-lib kiss-express
-cp src
--macro kiss.Kiss.setup()
--main template.Main
--js index.js
--cmd node index.js

View File

@@ -0,0 +1,16 @@
{
"name": "template",
"version": "0.0.0",
"description": "An ExpressJS website made with Kisslang",
"main": "index.js",
"scripts": {
"postinstall": "dts2hx --all"
},
"dependencies": {
"@types/express": "^4.17.13",
"express": "^4.18.1"
},
"devDependencies": {
"dts2hx": "^0.19.0"
}
}

View File

@@ -0,0 +1,7 @@
package template;
import kiss.Kiss;
import kiss.Prelude;
@:build(kiss.Kiss.build())
class Main {}

View File

@@ -0,0 +1,5 @@
(let [app (Express.call)
port 3000]
(app.get "/" ->[req res next] (res.send "Hello World!"))
(app.listen port ->(print "kiss-express listening at http://localhost:$port")))

View File

@@ -0,0 +1,4 @@
#! /bin/bash
npm install .
haxe build.hxml