Skip to content

A simple calendar server created with laravel sanctum.

Notifications You must be signed in to change notification settings

aluissp/calendar-server

Repository files navigation

A simple calendar server

This server contains the main endpoints for authentication and saving calendar events via tokens.

Setup

First, clone the repo and move into the project

git clone https://github.com/aluissp/calendar-server.git
cd calendar-server

Install dependencies

You can install the dependencies with the following command:

composer install

Set environment variables

After that you need to setup .env file, so copy the env.template file.

cp .env.example .env

Then, edit database name, user and password.

DB_DATABASE=your_database_name
DB_USERNAME=your_database_user_name
DB_PASSWORD=your_database_password

Generate encryption key

You must generate the encryption key into the project.

php artisan key:generate

Run the migrations

When the environment variables have set up already, you need to run the migrations.

php artisan migrate

Or run the following command to create generic data and a test user.

 php artisan migrate:fresh --seed

Run locally

Use the following command to run the server on localhost:8000.

php artisan serve

You can see the endpoints.

php artisan route:list

Test the api from the client side.

You can use postman to test each endpoint. However, I've added a calendar events app done with react. You just visit localhost:8000

If you have run the migrations with a test user, use this credentials to authenticate.

email: [email protected]
password: test1234

About

A simple calendar server created with laravel sanctum.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published