Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imagineeeinc/wings-js
Fast, small, bleeding edge web framework for Node js
https://github.com/imagineeeinc/wings-js
Last synced: about 9 hours ago
JSON representation
Fast, small, bleeding edge web framework for Node js
- Host: GitHub
- URL: https://github.com/imagineeeinc/wings-js
- Owner: imagineeeinc
- License: mit
- Created: 2021-05-26T18:08:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-02T15:06:28.000Z (over 3 years ago)
- Last Synced: 2023-11-20T16:00:58.260Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wings-js
Fast web framework for Node js![](https://img.shields.io/github/languages/count/imagineeeinc/wings-js)
![](https://img.shields.io/github/languages/top/imagineeeinc/wings-js)
![](https://img.shields.io/badge/Eureka_Server-not%20connected-red)
![](https://img.shields.io/bundlephobia/min/@imagineee/wing-js)
![](https://img.shields.io/github/languages/code-size/imagineeeinc/wings-js)
![](https://img.shields.io/github/repo-size/imagineeeinc/wings-js)
![](https://img.shields.io/github/size/imagineeeinc/wings-js/wing.min.js)
![](https://img.shields.io/tokei/lines/github/imagineeeinc/wings-js)
![](https://img.shields.io/npm/dm/@imagineee/wing-js)
![](https://img.shields.io/github/license/imagineeeinc/wings-js)
![](https://img.shields.io/npm/v/@imagineee/wing-js)```js
const wings = require("@imagineee/wing-js")
var app = new wings.server()app.listen(3000, () => console.log("running on port 3000"))
app.use('files', '/public')
app.onGet("/", (ctx) => {
ctx.res.send("hi")
})
app.onGet("/html", (ctx) => {
ctx.res.sendFile('./public/index.html')
})
```# Installation
This is a Node.js module available through the npm registry.Before installing, [download and install Node.js](https://nodejs.org/en/download/).
If this is a brand new project, make sure to create a package.json first with the npm init command.
Installation is done using the npm install command:
```bash
$ npm i @imagineee/wing-js
```# Features
- Small: ![](https://img.shields.io/bundlephobia/min/@imagineee/wing-js)
- Easy syntax
- Fast to setup
- More coming soon!# Philosophy
Wings is meant to be small, easy and fast out of the box with every thing provided.# Docs
To get started, import the module in your app after installation
```js
const wings = require("@imagineee/wing-js")
```
## API
- ``new server()``
to make a new server add:
```js
var app = new wings.server()
```- ``listen(port, callback)``
to start a server or listen on a port
- port [integer]: the port to listen on
- callback [function]: what to do when succeeded
__example__
```js
app.listen(3000, () => console.log("running on port 3000"))
```- ``onGet('path', callback)``
to respond on a reqest on a path
- path [string]: the path
- callback [function]: what to do affter reciving a request__example__
```js
app.onGet("/", (ctx) => {
ctx.res.send("hi")
})
```