mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2024-05-18 12:50:41 -04:00
modify code to support config.json in root of repo
This commit is contained in:
parent
0606435ce0
commit
33f6f33154
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
certs
|
||||
config.json
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# What is this?
|
||||
This is the Pretendo Network Miiverse API Server, which replaces the former Nintendo Network Miiverse API Server *.olv.nintendo.net
|
||||
# Install and usage
|
||||
First install [NodeJS](https://nodejs.org) and [MongoDB](https://mongodb.com). Download/clone this repo and run `npm i` to install all dependencies. Edit `src/config.json` to your liking. Run the server via `npm run start`.
|
||||
First install [NodeJS](https://nodejs.org) and [MongoDB](https://mongodb.com). Download/clone this repo and run `npm i` to install all dependencies. Create a `config.json` to your liking (example in `config.example.json`). Run the server via `npm run start`.
|
||||
# To-Do
|
||||
- [x] Discovery Server
|
||||
- [x] Posts Server
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const mongoose = require('mongoose');
|
||||
const { mongoose: mongooseConfig } = require('./config.json');
|
||||
const { mongoose: mongooseConfig } = require('../config.json');
|
||||
const { ENDPOINT } = require('./models/endpoint');
|
||||
const { COMMUNITY } = require('./models/communities');
|
||||
const { POST } = require('./models/post');
|
||||
|
|
|
@ -4,7 +4,7 @@ const morgan = require('morgan');
|
|||
const xmlparser = require('./middleware/xml-parser');
|
||||
const database = require('./database');
|
||||
const logger = require('./logger');
|
||||
const config = require('./config.json');
|
||||
const config = require('../config.json');
|
||||
|
||||
const { http: { port } } = config;
|
||||
const app = express();
|
||||
|
|
|
@ -2,7 +2,7 @@ const crypto = require('crypto');
|
|||
const NodeRSA = require('node-rsa');
|
||||
const fs = require('fs-extra');
|
||||
const database = require('../database');
|
||||
const config = require('../config.json');
|
||||
const config = require('../../config.json');
|
||||
const xmlParser = require('xml2json');
|
||||
const request = require("request");
|
||||
const moment = require('moment');
|
||||
|
|
Loading…
Reference in a new issue