https://github.com/syed007hassan/nasa-project-mern
Used Arwes Futuristic Sci-Fi UI and implemented REST APIs. NASA Exoplanets's data is used to find out the habitable planets and SPACEX-API is used for populating launches data.
https://github.com/syed007hassan/nasa-project-mern
arwes aws-ec2 dockers expressjs jest mongodb nasa-api node reactjs spacex-api
Last synced: 14 days ago
JSON representation
Used Arwes Futuristic Sci-Fi UI and implemented REST APIs. NASA Exoplanets's data is used to find out the habitable planets and SPACEX-API is used for populating launches data.
- Host: GitHub
- URL: https://github.com/syed007hassan/nasa-project-mern
- Owner: Syed007Hassan
- Created: 2023-01-31T04:41:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T22:00:22.000Z (about 2 years ago)
- Last Synced: 2025-02-17T21:46:33.254Z (3 months ago)
- Topics: arwes, aws-ec2, dockers, expressjs, jest, mongodb, nasa-api, node, reactjs, spacex-api
- Language: JavaScript
- Homepage: http://13.210.164.154:5000/
- Size: 3.42 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NASA-PROJECT-MERN
Used [Arwes](https://arwes.dev/) Futuristic Sci-Fi UI and implemented REST APIs. NASA [Exoplanets](https://exoplanetarchive.ipac.caltech.edu/)'s data is used to find out the habitable planets and [SPACEX-API](https://github.com/r-spacex/SpaceX-API) is used for populating launches data.## π Architecture Diagram
## πGetting Started
- In the terminal, run: ```git clone https://github.com/Syed007Hassan/NASA-PROJECT-MERN.git```
- Create a ```server/.env``` file with a ```MONGOATLASPASWORD``` property set to your MongoDB connection string and a ```PORT``` property set to ```5000```.
- In the terminal, run: ```npm install```
- In the terminal, run: ```npm run deploy```
- Browse to the mission control frontend at ```localhost:5000``` and schedule an interstellar launch!
## π Running the test
To run any autamated tests, run ```npm test```. This will
- Run all the client-side tests: ```npm test --prefix client```- Run all the server-side tests: ```npm test --prefix server```
## π Running the project using Dockers
- Ensure that you have the latest version of Docker installed and signed in with your account
- In the terminal, run: ```docker build -t /nasa-project``` (image being made)
- In the terminal, run: ```docker run -it -p 5000:5000 /nasa-project``` (application available at ```localhost:5000```)
- In the terminal, run: ```docker push /nasa-project``` (image being pushed to docker hub)
## π Creating EC2 instance on AWS and deploying container
- Create an [EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html) and configure it.
- If you are using windows [Install OpenSSH](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui)
- Connect to the created instance

- Now install dockers
```
sudo yum update
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker run --restart=always -p 5000:5000 /nasa-project
```

- Container is deployed and is available at [http://13.210.164.154:5000/](http://13.210.164.154:5000/)

## π Technologies used
- ReactJS: For client side
- NodeJs: For creating REST APIS and handling database
- Jest: For testing APIS and mocking database
- MongoDB: For performing CRUD operations on launches and planets data
- Dockers: For containerizing application
- Github Actions: For creating a CI/CD pipeline## π Demo
https://user-images.githubusercontent.com/104893311/226123516-307361b7-1ac1-423a-aa77-595ed54e4b38.mp4