Adam Mackintosh's API. Feel free to inspect.
$ git clone https://github.com/agm1984/adammackintosh-dot-net-server.git
$ cd adammackintosh-dot-net-server
$ npm install
$ npm run start:local
The API contains an example environment config which facilitates Neo4j and Mongo DB configurations and CORS.
Simply rename the file from ./env/config.example.js
to ./env/config.js
and change the database credentials.
adammackintosh.net uses Polyglot Persistence because relying on one database to handle all storage and retrieval duties is not maximally efficient or scalable. Rather, multiple databases are used, each for the duties at which it excels.
Neo4j is used to handle connected data (related data), and meta data aggregations. You will see it used for data analysis tasks and for recommending related content, specific to each user. Neo4j must be installed and running.
See ./connectors
Once MongoDB is installed and running, type mongo
in your CLI and then type:
> use adammackintosh
> db.createUser(
{
user: "adammackintosh",
pwd: "insertPasswordHere",
roles: [ "readWrite", "dbAdmin" ]
}
)
See ./connectors
- Define Mongoose Model in
./models
- Define GraphQL TypeDef
- Add queries/mutations to schema
- Add resolvers
- Define Joi field validation schema
- Test queries/mutations in GraphiQL
- Back-end is ready, proceed to Front-end
Submit any questions as issues on GitHub: https://github.com/agm1984/adammackintosh-dot-net-server/issues