This is a Node.js server that provides functionalities for the BlogTonic client. The frontend is using this GraphQL API to perform queries and mutations through this it.
- Node.js (version 16.x or higher)
- npm or yarn package manager
- Clone the repository
- Install dependencies using npm or yarn
npm iThe server needs a configuration file to work properly. Create a .env file in the root directory with the following variables:
NODE_ENV=
PORT=3000
DATABASE_URL=
JWT_SECRET=
AUTH_URL=To start the server in dev mode, run the following command:
npm run devTo build the server, run the following command:
npm run build- Write the script in the
package.jsonfile underscripts
"test": "jest --detectOpenHandles"- Run tests, use the following command:
npm tThe server will be available at http://localhost:3000/graphql.
This project is licensed under the MIT License - see the LICENSE.md file for details.