This is the starter I use to build the servers I need for my side projects. Read more about how it works at http://tiny.cc/nodejs-server-starter.
Features:
- A Koa.js server (Node JS)
- A MongoDB Database, access with mongo-express
- A GraphQL API
- Mocha/Chai integration tests
- GraphQL Code Generator
- Typescript
- Everything is containerized (docker-compose)
- Uses ESLint, Nodemon and git hooks for efficient development workflows.
- Clone the repo.
- Run
npm install
. - Duplicate
sample.env
, rename it.env
and edit it with your secret variables. - Start the database and mongo-express containers by running
docker-compose up -d database mongo-express
. - Start the server by running
npm run start
. - Start coding! Head to
http://localhost:8081/
to use mongo-express to browse the database, and tolocalhost:<SERVER_PORT>/graphiql
to play with graphQL. Extend the server with the features you need for your application.
Contributions to fix/improve this starter are welcome. Note that the goal is to keep it generic so that it can be used for any kind of server.
Open a Pull Request.