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

Multiple Apis #10

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
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
13 changes: 13 additions & 0 deletions Goobieverse/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
31 changes: 31 additions & 0 deletions Goobieverse/.env.local.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# DB variables -------------------
DB_HOST=localhost
DB_PORT=27017
DB_NAME=tester
DB_USER=metaverse
DB_PASSWORD=nooneknowsit
DB_AUTHDB=admin
DATABASE_URL=

# Authentication variables -------------------
AUTH_SECRET=M7iszvSxttilkptn22GT4/NbFGY=

# Server variables ---------------
SERVER_HOST=localhost
SERVER_PORT=3030
SERVER_VERSION=1.1.1-20200101-abcdefg

# General ------------------------
LOCAL=true
APP_ENV=development
PUBLIC_PATH=./public

# Metaverse ------------------------
METAVERSE_NAME=Vircadia noobie
METAVERSE_NICK_NAME=Noobie
METAVERSE_SERVER_URL=
DEFAULT_ICE_SERVER_URL=
DASHBOARD_URL=https://dashboard.vircadia.com
LISTEN_HOST=0.0.0.0
LISTEN_PORT=9400
38 changes: 38 additions & 0 deletions Goobieverse/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off"
}
}
115 changes: 115 additions & 0 deletions Goobieverse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Users Environment Variables
.lock-wscript

# IDEs and editors (shamelessly copied from @angular/cli's .gitignore)
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# Others
lib/
data/

.env.local
package-lock.json
45 changes: 45 additions & 0 deletions Goobieverse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Goobieverse

>

## About

This project uses [Feathers](http://feathersjs.com). An open source web framework for building modern real-time applications.

## Getting Started

Getting up and running is as easy as 1, 2, 3.

1. Make sure you have [NodeJS](https://nodejs.org/) and [npm](https://www.npmjs.com/) installed.
2. Install your dependencies

```
cd path/to/Goobieverse
npm install
```

3. Start your app

```
npm start
```

## Testing

Simply run `npm test` and all your tests in the `test/` directory will be run.

## Scaffolding

Feathers has a powerful command line interface. Here are a few things it can do:

```
$ npm install -g @feathersjs/cli # Install Feathers CLI

$ feathers generate service # Generate a new Service
$ feathers generate hook # Generate a new Hook
$ feathers help # Show all commands
```

## Help

For more information on all the things you can do with Feathers visit [docs.feathersjs.com](http://docs.feathersjs.com).
32 changes: 32 additions & 0 deletions Goobieverse/build_scripts/createVersion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

const fse = require('fs-extra');

var gitVer = require('child_process').execSync('git rev-parse --short HEAD').toString().trim();
var gitVerFull = require('child_process').execSync('git rev-parse HEAD').toString().trim();
var packageVersion = process.env.npm_package_version;
const filePath = './lib/metaverse_info.json';

console.log('Found package version', packageVersion);
console.log('Found Git commit short hash', gitVer);
console.log('Found Git commit long hash', gitVerFull);

function yyyymmdd() {
var x = new Date();
var y = x.getFullYear().toString();
var m = (x.getMonth() + 1).toString();
var d = x.getDate().toString();
(d.length == 1) && (d = '0' + d);
(m.length == 1) && (m = '0' + m);
var yyyymmdd = y + m + d;
return yyyymmdd;
}

var jsonToWrite = {
npm_package_version: packageVersion,
git_commit: gitVerFull,
version_tag: (packageVersion + '-' + yyyymmdd() + '-' + gitVer)
};

jsonToWrite = JSON.stringify(jsonToWrite);

var attemptFileWrite = fse.outputFileSync(filePath, jsonToWrite);
9 changes: 9 additions & 0 deletions Goobieverse/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
diagnostics: false
}
}
};
94 changes: 94 additions & 0 deletions Goobieverse/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"name": "goobie-verse",
"description": "Goobieverse",
"version": "0.0.1",
"homepage": "",
"private": true,
"main": "src",
"keywords": [
"feathers"
],
"author": {
"name": "",
"email": ""
},
"contributors": [],
"bugs": {},
"directories": {
"lib": "src",
"test": "test/"
},
"engines": {
"node": "^16.0.0",
"npm": ">= 3.0.0"
},
"scripts": {
"test": "npm run lint && npm run compile && npm run jest",
"lint": "eslint src/. test/. --config .eslintrc.json --ext .ts --fix",
"dev": "ts-eager src/index.ts cross-env APP_ENV=development",
"start": "cross-env APP_ENV=prod npm run compile && node lib/",
"jest": "jest --forceExit",
"compile": "shx rm -rf lib/ && tsc",
"create-version": "node build_scripts/createVersion.js"
},
"standard": {
"env": [
"jest"
],
"ignore": []
},
"types": "lib/",
"dependencies": {
"@feathersjs/authentication": "^4.5.11",
"@feathersjs/authentication-local": "^4.5.11",
"@feathersjs/authentication-oauth": "^4.5.11",
"@feathersjs/configuration": "^4.5.11",
"@feathersjs/errors": "^4.5.11",
"@feathersjs/express": "^4.5.11",
"@feathersjs/feathers": "^4.5.11",
"@feathersjs/socketio": "^4.5.11",
"@feathersjs/transport-commons": "^4.5.11",
"@types/dotenv-flow": "^3.2.0",
"app-root-path": "^3.0.0",
"bcrypt": "^5.0.1",
"compression": "^1.7.4",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv-flow": "^3.2.0",
"feathers-hooks-common": "^5.0.6",
"feathers-mailer": "^3.1.0",
"feathers-mongodb": "^6.4.1",
"helmet": "^4.6.0",
"mongodb": "^4.2.2",
"mongodb-core": "^3.2.7",
"nodemailer-smtp-transport": "^2.7.4",
"serve-favicon": "^2.5.0",
"trim": "^1.0.1",
"ts-eager": "^2.0.2",
"uuidv4": "^6.2.12",
"winston": "^3.3.3"
},
"devDependencies": {
"@types/app-root-path": "^1.2.4",
"@types/bcrypt": "^5.0.0",
"@types/compression": "^1.7.2",
"@types/cors": "^2.8.12",
"@types/dotenv-flow": "^3.2.0",
"@types/jest": "^27.0.3",
"@types/jsonwebtoken": "^8.5.6",
"@types/mongodb": "^4.0.7",
"@types/morgan": "^1.9.3",
"@types/nodemailer-smtp-transport": "^2.7.5",
"@types/serve-favicon": "^2.5.3",
"@types/trim": "^0.1.1",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"axios": "^0.24.0",
"eslint": "^8.5.0",
"jest": "^27.4.5",
"shx": "^0.3.3",
"ts-jest": "^27.0.7",
"ts-node-dev": "^1.1.8",
"typescript": "^4.5.4"
}
}
Binary file added Goobieverse/public/favicon.ico
Binary file not shown.
Loading