Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit c2513d3

Browse files
author
Kris Mokrzycki
committed
Removed all jobsite specific references this includes git repo and sinopia modules
1 parent e3892f5 commit c2513d3

File tree

4 files changed

+1361
-1281
lines changed

4 files changed

+1361
-1281
lines changed

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
FROM docker1.inf.weboperations.co.uk/node_centos7:7.5.0_48
1+
FROM node:6.10
22
MAINTAINER Standards Team (Temp Name)
33

44
USER root
5-
RUN chown -R nodeapp:nodeapp /opt/nodeapp
6-
RUN npm install -g yarn
5+
RUN mkdir /opt/nodeapp
6+
RUN chown -R node:node /opt/nodeapp
7+
# RUN npm install -g yarn
78

89
COPY . /opt/nodeapp
9-
RUN chown nodeapp:nodeapp /opt/nodeapp/yarn.lock /opt/nodeapp/package.json
10+
RUN chown node:node /opt/nodeapp/yarn.lock /opt/nodeapp/package.json
1011

11-
USER nodeapp
12+
USER node
1213

1314
WORKDIR /opt/nodeapp
1415

1516
RUN yarn install
1617

1718
RUN npm run build
1819

19-
EXPOSE 9997
20+
EXPOSE 40001
2021

2122
ENTRYPOINT ["./bin/start.sh"]
2223

README.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,37 @@ Boilerplate API requires [Node.js](https://nodejs.org/) v6+ to run.
3535
Open your favorite Terminal and run these commands.
3636

3737
```sh
38-
$ git clone ssh://git@stash.inf.weboperations.co.uk:7999/fram/node-es6-api-framework.git
39-
$ cd node-es6-api-framework
38+
$ git git@github.com:Trufa-me/Node-ES6-API-Framework.git
39+
$ cd Node-ES6-API-Framework
4040
```
4141

42-
You can move confg/example_default.js to more convenient place e.g. /etc/jobsite/node-es6-api-framework/default.json and point confg/example_default.js simlink to a new target.
42+
You can move confg/example_default.js to more convenient place e.g. /etc/jobsite/Node-ES6-API-Framework/default.json and point confg/example_default.js simlink to a new target.
4343

4444
In your terminal, run the following as below:
4545

4646
```sh
47-
$ ln -s /etc/jobsite/node-es6-api-framework/default.json config/default.json
47+
$ ln -s /etc/jobsite/Node-ES6-API-Framework/default.json config/default.json
4848
```
4949

5050
### Start application for Development
5151

5252
Open your favorite Terminal and run these commands.
5353

54+
55+
In development project relies on nvm as well as yarn so install those:
56+
57+
Install nvm:
58+
```sh
59+
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
60+
nvm install v6.10.0
61+
62+
```
63+
64+
Install yarn:
65+
```sh
66+
$ npm install -g yarn
67+
```
68+
5469
Run the following:
5570

5671
```sh
@@ -71,24 +86,24 @@ $ ./bin/start.sh start:prod
7186
```
7287

7388
You should get below output:
74-
```[developer@myMachine node-es6-api-framework]$ ./bin/start.sh
75-
Found '/home/developer/projects/node-es6-api-framework/.nvmrc' with version <v7.5.0>
76-
Now using node v7.5.0 (npm v4.1.2)
89+
```[developer@myMachine Node-ES6-API-Framework]$ ./bin/start.sh
90+
Found '/home/developer/projects/Node-ES6-API-Framework/.nvmrc' with version <v6.10.0>
91+
Now using node v6.10.0 (npm v4.1.2)
7792
yarn install v0.20.3
7893
warning boilerplate-api@1.1.0: "dependencies" has dependency "nodemon" with range "^1.11.0" that collides with a dependency in "devDependencies" of the same name with version "^1.9.0"
7994
[1/4] Resolving packages...
8095
success Already up-to-date.
8196
Done in 0.64s.
8297

83-
> boilerplate-api@1.1.0 start:dev /home/developer/projects/node-es6-api-framework
98+
> boilerplate-api@1.1.0 start:dev /home/developer/projects/Node-ES6-API-Framework
8499
> cross-env NODE_ENV=development ./node_modules/nodemon/bin/nodemon.js nodemon
85100

86101
[nodemon] 1.11.0
87102
[nodemon] to restart at any time, enter `rs`
88-
[nodemon] watching: /home/developer/projects/node-es6-api-framework/src/**/*
103+
[nodemon] watching: /home/developer/projects/Node-ES6-API-Framework/src/**/*
89104
[nodemon] starting `npm run babel-node -- src/index.js nodemon`
90105

91-
> boilerplate-api@1.1.0 babel-node /home/developer/projects/node-es6-api-framework
106+
> boilerplate-api@1.1.0 babel-node /home/developer/projects/Node-ES6-API-Framework
92107
> babel-node --ignore node_modules,tests "src/index.js" "nodemon"
93108

94109
Front-End server is running at http://localhost:40001
@@ -106,9 +121,9 @@ $ ./bin/start.sh test
106121
```
107122

108123
Output:
109-
```[developer@myMachine node-es6-api-framework]$ ./bin/start.sh test
124+
```[developer@myMachine Node-ES6-API-Framework]$ ./bin/start.sh test
110125

111-
> boilerplate-api@1.1.0 test /home/developer/projects/node-es6-api-framework
126+
> boilerplate-api@1.1.0 test /home/developer/projects/Node-ES6-API-Framework
112127
> mocha --recursive ./tests/ --compilers js:babel-core/register
113128

114129

@@ -119,7 +134,7 @@ Output:
119134

120135
1 passing (58ms)
121136

122-
[developer@myMachine node-es6-api-framework]$
137+
[developer@myMachine Node-ES6-API-Framework]$
123138
```
124139

125140
### Generate test coverage report
@@ -131,9 +146,9 @@ $ ./bin/start.sh test:coverage
131146
```
132147

133148
Output:
134-
```[developer@myMachine node-es6-api-framework]$ ./bin/start.sh test:coverage
149+
```[developer@myMachine Node-ES6-API-Framework]$ ./bin/start.sh test:coverage
135150

136-
> boilerplate-api@1.1.0 test:coverage /home/developer/projects/node-es6-api-framework
151+
> boilerplate-api@1.1.0 test:coverage /home/developer/projects/Node-ES6-API-Framework
137152
> nyc --reporter=lcov --reporter=text ./node_modules/.bin/mocha --recursive --require babel-register ./tests/
138153

139154

@@ -149,7 +164,7 @@ File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
149164
----------|----------|----------|----------|----------|----------------|
150165
All files | Unknown | Unknown | Unknown | Unknown | |
151166
----------|----------|----------|----------|----------|----------------|
152-
[developer@myMachine node-es6-api-framework]$
167+
[developer@myMachine Node-ES6-API-Framework]$
153168
```
154169

155170
Viewing the coverage report:
@@ -164,23 +179,23 @@ cd boiler-plate-api
164179
docker build .
165180
```
166181

167-
This will create the Boilerplate API image and pull in the necessary dependencies. Once done, run the Docker and map the port to whatever you wish on your host 4005 in this case:
182+
This will create the Boilerplate API image and pull in the necessary dependencies. Once done, run the Docker and map the port to whatever you wish on your host 40001 in this case:
168183

169184
```sh
170-
docker run -d -t -p 9999:9999 --name boiler_plate_api --restart=always boiler_plate_api
185+
docker run -d -t -p 40001:40001 --name boiler_plate_api --restart=always boiler_plate_api
171186
```
172187

173188
Verify the deployment by navigating to your server address in your preferred browser.
174189

175-
e.g http://localhost:9999/v1/someapi/example
190+
e.g http://localhost:40001/v1/someapi/example
176191

177192
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
178193

179194

180195
[babeljs]: <https://babeljs.io/>
181196
[docker]: <https://www.docker.com/>
182-
[git-repo-url]: <http://stash.inf.weboperations.co.uk:7990/projects/SIFTR/repos/recruiter-boilerplate-api/browse>
183-
[git-clone-url]: <ssh://git@stash.inf.weboperations.co.uk:7999/siftr/recruiter-boilerplate-api.git>
197+
[git-repo-url]: <https://github.com/Trufa-me/Node-ES6-API-Framework>
198+
[git-clone-url]: <git@github.com:Trufa-me/Node-ES6-API-Framework.git>
184199
[node.js]: <http://nodejs.org>
185200
[express]: <http://expressjs.com>
186201
[nodemon]: <https://github.com/remy/nodemon/blob/master/README.md>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"rimraf": "^2.5.4"
5353
},
5454
"engines": {
55-
"node": "7.5.0"
55+
"node": "6.10.0"
5656
},
5757
"nyc": {
5858
"include": [

0 commit comments

Comments
 (0)