Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eranshmil/ionic-express-assignment
An Ionic & Express application that redirect the user to the selected/default url.
https://github.com/eranshmil/ionic-express-assignment
angular express ionic nodejs
Last synced: about 1 month ago
JSON representation
An Ionic & Express application that redirect the user to the selected/default url.
- Host: GitHub
- URL: https://github.com/eranshmil/ionic-express-assignment
- Owner: eranshmil
- License: mit
- Created: 2018-10-14T17:11:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-12T01:40:54.000Z (about 4 years ago)
- Last Synced: 2024-05-27T20:42:02.004Z (8 months ago)
- Topics: angular, express, ionic, nodejs
- Language: TypeScript
- Homepage:
- Size: 3.04 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ionic & Express.js Assignment
An Ionic & Express application that redirect the user to the selected/default url.
## Live server
```
https://ionic-express-assignment.herokuapp.com/
```## Installation
```sh
yarn
# or
npm install
```## Usage
```sh
# run ionic client
yarn dev:client
# or
npm run dev:client# run express server
yarn dev:server
# or
npm run dev:server# run both
yarn dev
#or
npm run dev# run ionic client using production api
yarn prod
# or
npm run prod
```## Running server with docker
If you don't have MongoDB on your environment, you could use the docker.
First, create docker machine and enable port forwarding to your host:
```bash
docker-machine create assignment
eval $(docker-machine env assignment)vboxmanage controlvm assignment natpf1 "3000,tcp,127.0.0.1,3000,,3000"
vboxmanage controlvm assignment natpf1 "27017,tcp,127.0.0.1,27017,,27017"
```Then use the following commands to run/stop the containers:
```bash
# run first time
docker-compose up --build# and then
docker-compose up# stop
docker-compose down
```## Endpoints
Base url path: /api/v1
| Method | Path | Description |
| :----: | :-------: | :-----------------------------------------------: |
| POST | /url | url: string, redirect: boolean |
| GET | /db | Seed the collection with default url (google.com) |
| GET | /db/clear | Clear the collection from urls |## Built with
| Package | Version |
| :----------------------------------------------------------------------------------: | :-----: |
| [Express.js](https://github.com/expressjs/express) | 4.\* |
| [Socket.IO](https://github.com/socketio/socket.io) | 2.\* |
| [Mongoose](https://github.com/Automattic/mongoose) | 5.\* |
| [express-validator](https://github.com/express-validator/express-validator) | 5.\* |
| [response-time](https://github.com/expressjs/response-time) | 2.\* |
| [Angular](https://github.com/angular/angular) | 5.2.11 |
| [ng-socket-io](https://github.com/bougarfaoui/ng-socket-io) | 0.2\* |
| [Ionic](https://github.com/ionic-team/ionic) | 3.9.2 |
| [cordova-plugin-inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser) | 3.0.\* |## Developed under
| Platform | Version |
| :-------: | :--------: |
| macOS | 10.13.6 |
| NodeJS | 8.11.1 |
| npm | 6.1.0 |
| Yarn | 1.9.4 |
| Cordova | 8.1.2 |
| Ionic CLI | 4.2.1 |
| Docker | 18.06.1-ce |
| MongoDB | 4.0.3 |