Skip to content

Commit

Permalink
Released 1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jclo committed Oct 2, 2020
1 parent f0c4792 commit ac4a1cf
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -4,7 +4,7 @@

* Updated the project dependencies,
* Fixed a regression on Wapi package contents,
* ...,
* Release.


### 0.0.1 (August 10, 2020)
Expand Down
62 changes: 31 additions & 31 deletions README.md
Expand Up @@ -11,44 +11,44 @@
`Wapi` is a slim, fast and minimal API framework built on top of Express.JS. It is built to provide a flexible API consumable from other apps.


## Build an Run

You can create an API Server from `Wapi` in a very few steps:

1. create a folder that contains your project,

3. then, execute the following commands from a shell terminal:

```bash
npm install wapi
./node_modules/.bin/wapi create -n <name_of_your_app>
npm install
```
## Quick Startup

You can easily get your first Wapi 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:

```json
{
"name": "NameOfYourProject",
"scripts": {
"create": "npm install @mobilabs/wapi && npm run populate",
"populate": "wapi populate --name ${npm_package_name} --author \"${npm_package_writer_name}\" --acronym ${npm_package_writer_acronym} --email ${npm_package_writer_email} --url ${npm_package_writer_url} && npm install"
},
"writer": {
"name": "John Doe",
"acronym": "jdo",
"email": "jdo@johndoe.com",
"url": "http://www.johndoe.com/"
}
}
```
Replace `NameOfYourProject` by your project name and fill `writer` with your credentials.

That's all!
And finally, type in the terminal:

Your API server is almost ready to run. If you want to use `https` calls, you have to create your certificates and store them in `server/ssl`. Read the README.md to know how to create them.
```bash
npm run create.
```

You can run it without `https` (for testing purpose only) by replacing in the file `server/config.js`:
Your project is almost ready. As, Wapi 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`.

```javascript
env: {
...
https: true,
...
}
```
Now you can starts your server by typing:

by:
```javascript
env: {
...
https: false,
...
}
```bash
npm run app
```

Now, start it by typing `npm run app`. you should get a list of messages telling that the server is running. If you want to observe transactions, you can open a second terminal and type `npm run test`.
You should get a list of messages telling that the server is running. If you want to observe transactions, you can open a second terminal and type `npm run test`.


## Documentation
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@mobilabs/wapi",
"version": "1.0.0-beta.2",
"version": "1.0.0",
"description": "A light Node.JS API Server Framework",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit ac4a1cf

Please sign in to comment.