1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge pull request #102 from oceanprotocol/fix/server-dev

server task cleanup
This commit is contained in:
Matthias Kretschmann 2019-04-12 18:27:08 +02:00 committed by GitHub
commit 80f8002438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 19 deletions

View File

@ -9,7 +9,11 @@ script:
notifications: notifications:
email: false email: false
cache: npm cache:
directories:
- node_modules
- client/node_modules
- server/node_modules
deploy: deploy:
- provider: script - provider: script

View File

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts --max_old_space_size=4096 build", "build": "react-scripts --max_old_space_size=4096 build",
"test": "react-scripts test", "test": "react-scripts test --coverage",
"eject": "react-scripts eject" "eject": "react-scripts eject"
}, },
"dependencies": { "dependencies": {

View File

@ -5,7 +5,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {
"install": "./scripts/install.sh", "install": "./scripts/install.sh",
"start": "concurrently \"cd client && npm run start\" \"cd server && npm run start-watch\"", "start": "concurrently \"cd client && npm start\" \"cd server && npm start\"",
"build": "./scripts/build.sh", "build": "./scripts/build.sh",
"test": "npm run lint && scripts/test.sh", "test": "npm run lint && scripts/test.sh",
"format:js": "prettier --parser typescript --write '**/*.{js,jsx,ts,tsx}'", "format:js": "prettier --parser typescript --write '**/*.{js,jsx,ts,tsx}'",

View File

@ -5,9 +5,8 @@ WORKDIR /app/backend/
COPY . . COPY . .
RUN npm install RUN npm install && \
npm run build
RUN npm run build ENTRYPOINT ["npm", "run", "serve"]
ENTRYPOINT ["npm", "run", "start"]

View File

@ -1,6 +0,0 @@
{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node src/index.ts"
}

View File

@ -3,14 +3,13 @@
"description": "Ocean Protocol marketplace backend.", "description": "Ocean Protocol marketplace backend.",
"version": "1.0.0", "version": "1.0.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "dist/index.js", "main": "dist/server.js",
"scripts": { "scripts": {
"start": "node dist/index.js", "start": "nodemon --exec ts-node src/server.ts",
"start-watch": "nodemon", "serve": "node dist/server.js",
"build": "tsc", "build": "tsc",
"watch": "tsc -w",
"test": "jest --coverage", "test": "jest --coverage",
"watch-test": "npm run test --watchAll" "test-watch": "npm run test --watchAll"
}, },
"dependencies": { "dependencies": {
"body-parser": "^1.18.3", "body-parser": "^1.18.3",

View File

@ -1,5 +1,5 @@
import request from 'supertest' import request from 'supertest'
import server from '../src' import server from '../src/server'
import {} from 'jasmine' import {} from 'jasmine'
afterAll(done => { afterAll(done => {