diff --git a/.gitignore b/.gitignore index 399146e..a0c842c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules +/package-lock.json /dist *.js \ No newline at end of file diff --git a/README.md b/README.md index 8743b6d..bb7f3e7 100644 --- a/README.md +++ b/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 -##### 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 : ```bash -$ tsc +$ npm run build ``` 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. diff --git a/package.json b/package.json new file mode 100644 index 0000000..67aaa65 --- /dev/null +++ b/package.json @@ -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" + } +}