Food tracker is a service that allows you to keep track of what food you eat via its GraphQL API. It's currently built for single-user use, i.e. food records and food items aren't bound to any particular user.
Footr is fully compliant with the JavaScript Standard Style.
Documentation for Footr's GraphQL API can be found on my GitHub Pages.
You'll need a running instance of MongoDB to store the records. Make sure to save your connection string URI in the MONGODB_CONNECTION_STRING
environment variable or in the .env
file. The .env.example
file serves as an example.
# File: .env
MONGODB_CONNECTION_STRING='mongodb://localhost:27017/myapp'
Clone the repository and install dependencies
git clone https://github.com/hajekjiri/footr.git
cd footr
npm install
Simply start the server with npm run start
.
$ npm run start
> [email protected] start /home/jiri/projects/footr
> node app.js
Apollo Server ready at http://localhost:4000/
Connected to database
For development, you'll want to start the server with npm run server
which starts it with nodemon and reloads it each time you make any changes.
$ npm run server
> [email protected] server /home/jiri/projects/footr
> nodemon app.js
[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
Apollo Server ready at http://localhost:4000/
Connected to database
One of the ways you can interact with Footr is the GraphQL Playground which should be located at http://localhost:4000/graphql once you start the server.
- apollographql/apollo-server is licensed under the MIT License
- Automattic/mongoose is licensed under the MIT License
- excitement-engineer/graphql-iso-date is licensed under the MIT License
- motdotla/dotenv is licensed under the BSD-2-Clause License