2.1.1 • Published 3 months ago

@mobilabs/kapp v2.1.1

Weekly downloads
15
License
MIT
Repository
github
Last release
3 months ago

KApp

NPM version GitHub last commit Github workflow Test coverage License

KApp is a boilerplate to build a slim Node.js App server that serves a web App and responds to api requests from the web App.

Quick Startup

You can easily get your first KApp Server running in a couple of minutes by just typing a few command lines. But first, you need to create an empty folder. It will contain your project.

Then, you just need to create a package.json file that contains:

{
  "name": "NameOfYourProject",
  "scripts": {
    "create": "npm install @mobilabs/kapp && npm run populate",
    "populate": "kapp populate --name $npm_package_name --author $npm_package_config_name --acronym $npm_package_config_acronym --email $npm_package_config_email --url $npm_package_config_url && npm install"
  },
  "config": {
    "name": "John Doe",
    "acronym": "jdo",
    "email": "jdo@johndoe.com",
    "url": "http://www.johndoe.com/"
  }
}

Replace NameOfYourProject by your project name and fill config with your credentials.

And finally, type in the terminal:

npm run create.

Your project is almost ready. As, KApp relies on https, you have to add your certificates in the folder server/ssl or you can disable https (not recommended) in server/config.js.

Now you can starts your server by typing:

npm run app

Access through a browser

Open your browser and connect to your server with the url http://localhost:1080 or https://localhost:1443.

Through Node.js

Open a terminal and type:

node examples/node/test.js

Through Curl

Open a terminal and type:

sh examples/curl/curl.sh

or:

sh examples/curl/curl_cookie_login.sh

Extend KApp

You can easily add new APIs to KApp by filling the _custom folder.

The _custom/api folder contains your new APIs, the folder _custom/controllers contains the APIs implementation and the _custom/dbi folder contains the methods to fill/read the database.

That's all.

License

MIT.

-- oOo ---

2.1.1

3 months ago

2.1.0

4 months ago

2.0.0-beta.2

4 months ago

2.0.0-beta.1

4 months ago

2.0.0-beta.4

4 months ago

2.0.0

4 months ago

2.0.0-beta.3

4 months ago

1.9.1

1 year ago

1.9.0

1 year ago

1.6.3

1 year ago

1.8.0

1 year ago

1.6.2

1 year ago

1.7.0

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3-beta.6

3 years ago

1.0.3-beta.5

3 years ago

1.0.3-beta.4

3 years ago

1.0.3-beta.3

3 years ago

1.0.3-beta.2

3 years ago

1.0.3-beta.1

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.1-beta.1

4 years ago

1.0.0

4 years ago

1.0.0-beta.1

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago