An Awesome full-stack Forum made using Angular and Laravel
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Download th repo using this command inside terminal
git clone https://github.com/Arm0ny/ForumProject
This is an example of how to list things you need to use the software and how to install them.
-
npm
npm install npm@latest -g
-
ng-cli
npm install -g @angular/cli
-
php composer
follow the instructions available here
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Clone the repo
git clone https://github.com/Arm0ny/ForumProject
- cd inside front-end directory of the project
cd ForumProject/front-end/
- install dependencies
npm install
- serve the application and remember the port it's running on
we will assume it's 4200ng serve
- cd inside forum-api directory
cd ../forum-api
- install php dependencies
composer install
- run the php server and remember the port it's running on we will assume it's on port 8000
php artisan serve
to correctly run the application you need to setup some Laravel environment variables inside the forum-api folder
-
create a new .env file inside the forum-api directory
-
copy and paste the content from the .env.example
-
change the database configuration parameters:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 //your db host DB_PORT=3306 //your DB port DB_DATABASE=forum_api //your DB bame DB_USERNAME=root //DB username DB_PASSWORD= //password of the databse user
-
add the front-end URL
FRONTEND_URL=http://127.0.0.1:4200 //this should be the angural front-end url
-
add the session data and stateful domains for sanctum configuration
SESSION_LIFETIME=120 SESSION_DOMAIN=127.0.0.1 SANCTUM_STATEFUL_DOMAINS=127.0.0.1:4200 //the angular front-end URL
-
generate an application key:
php artisan key:generate
-
run migrations:
php artisan migrate
this will create the databases tables and set up the back-end of the application
now we need to do a few steps to make sure the correct back-end url is configured inside the front-end environment
- Go to the front-end library
- open the src/environments folder
- search for the development folder
- inside it you should find environment.development.ts file
- change this line to your back-end url
BACKEND_URL : 'your back end url'
you are don!, now you only need to run two commands to run the application locally:
- inside forum-api
php artisan serve
- inside forum front-end
ng serve
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - @your_twitter - email@example.com
Project Link: https://github.com/your_username/repo_name
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!