use npm -> update readme
This commit is contained in:
parent
6b53a6358f
commit
da6edab899
|
@ -1,3 +1,4 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
|
/package-lock.json
|
||||||
/dist
|
/dist
|
||||||
*.js
|
*.js
|
19
README.md
19
README.md
|
@ -5,18 +5,29 @@ Simple REST API mixer as a service. A minimal service will be deployed on your l
|
||||||
|
|
||||||
### Launch the project
|
### Launch the project
|
||||||
|
|
||||||
##### 1. Transpile sources
|
##### Prerequisites
|
||||||
|
|
||||||
> You need to install `typescript`, it will automatically install its compiler (_i.e. tsc_) into your environment path. You can easily install it globally with `npm -g i typescript`.
|
You need `node` and `npm` installed.
|
||||||
|
|
||||||
|
##### 1. Install dependencies
|
||||||
|
|
||||||
|
Go into the project's folder and run :
|
||||||
|
```bash
|
||||||
|
$ npm i
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 2. Transpile sources
|
||||||
|
|
||||||
Then launch the following command inside the project's folder :
|
Then launch the following command inside the project's folder :
|
||||||
```bash
|
```bash
|
||||||
$ tsc
|
$ npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
All source files of the `src/` folder will be transpiled into the `dist/` folder.
|
All source files of the `src/` folder will be transpiled into the `dist/` folder.
|
||||||
|
|
||||||
##### 2. Launch server
|
> It is also possible to watch the typescript while developping and modifying files with the command `npm run watch`.
|
||||||
|
|
||||||
|
##### 3. Launch server
|
||||||
|
|
||||||
> You need to have `node` installed.
|
> You need to have `node` installed.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"name": "api-mixer.js",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": "xdrm-brackets | SeekDaSky",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "Simple REST API mixer as a service.",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.xdrm.io/MTI/api-mixer.js"
|
||||||
|
},
|
||||||
|
"main": "dist/main.js",
|
||||||
|
"dependencies": {
|
||||||
|
"request": "^2.88.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^10.12.0",
|
||||||
|
"typescript": "^3.1.3"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"watch": "tsc -w",
|
||||||
|
"start": "node dist/main.js"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue