Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correcting repo fork #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.env
.git
.gitignore
node_modules
npm-debug.log
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#using Node v10
FROM node:10

# Create app directory
WORKDIR /usr/src/lafs

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

# Expose port 3000 outside container
EXPOSE 3000
# Command used to start application
CMD npm run start
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.7'
services:
# REST API running on Node JS container
app:
container_name: lafs-api
restart: always
build: .
ports:
- '3000:3000'
# link this container to the Mongo DB container
links:
- mongo
# pass in environment variables for database host and name
environment:
- DB_HOST=mongo
- DB_NAME=lafs-db
# Mongo DB storage container
mongo:
container_name: lafs-db
image: 'mongo:4'
ports:
- '27017:27017'
# Attach the external network to these containers
networks:
default:
external:
name: lafs-net
52 changes: 52 additions & 0 deletions explorer
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>LoopBack API Explorer</title>
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='print' rel='stylesheet' type='text/css'/>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='lib/lodash.min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>

<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>

<!-- Init swagger UI. -->
<script src='lib/loadSwaggerUI.js' type="text/javascript"></script>
</head>

<body class="swagger-section standalone">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo">LoopBack API Explorer</a>
<form id='api_selector'>
<div class='input'>
<span class='accessTokenDisplay'>Token Not Set</span>
<input placeholder="accessToken" id="input_accessToken" name="accessToken" type="text"/>
</div>
<div class='input'><a id="explore" type="submit">Set Access Token</a></div>
</form>
</div>
</div>

<div class="contentWell">
<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</div>
</body>
</html>
52 changes: 52 additions & 0 deletions explorer.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>LoopBack API Explorer</title>
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='print' rel='stylesheet' type='text/css'/>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='lib/lodash.min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>

<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>

<!-- Init swagger UI. -->
<script src='lib/loadSwaggerUI.js' type="text/javascript"></script>
</head>

<body class="swagger-section standalone">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo">LoopBack API Explorer</a>
<form id='api_selector'>
<div class='input'>
<span class='accessTokenDisplay'>Token Not Set</span>
<input placeholder="accessToken" id="input_accessToken" name="accessToken" type="text"/>
</div>
<div class='input'><a id="explore" type="submit">Set Access Token</a></div>
</form>
</div>
</div>

<div class="contentWell">
<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"started":"2025-01-14T18:44:58.256Z","uptime":2.779}
52 changes: 52 additions & 0 deletions index.html.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>LoopBack API Explorer</title>
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/loopbackStyles.css' media='print' rel='stylesheet' type='text/css'/>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='lib/lodash.min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>

<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>

<!-- Init swagger UI. -->
<script src='lib/loadSwaggerUI.js' type="text/javascript"></script>
</head>

<body class="swagger-section standalone">
<div id='header'>
<div class="swagger-ui-wrap">
<a id="logo">LoopBack API Explorer</a>
<form id='api_selector'>
<div class='input'>
<span class='accessTokenDisplay'>Token Not Set</span>
<input placeholder="accessToken" id="input_accessToken" name="accessToken" type="text"/>
</div>
<div class='input'><a id="explore" type="submit">Set Access Token</a></div>
</form>
</div>
</div>

<div class="contentWell">
<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions index.html.2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"started":"2025-01-14T20:43:59.880Z","uptime":65.334}
1 change: 1 addition & 0 deletions index.html.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"started":"2025-01-14T20:51:30.374Z","uptime":33.828}
19 changes: 10 additions & 9 deletions server/datasources.development.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module.exports = {
mongodb: {
connector: 'mongodb',
hostname: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
url: process.env.DB_URL
}
mongodb: {
connector: 'mongodb',
hostname: process.env.DB_HOST || 'localhost',
port: process.env.DB_PORT || 27017,
user: process.env.DB_USER || '',
password: process.env.DB_PASSWORD || '',
database: process.env.DB_NAME || 'lafs',
url: process.env.DB_URL
}
};