An open API service indexing awesome lists of open source software.

https://github.com/dansantander/emberposts

A basic Ember Js CRUD application
https://github.com/dansantander/emberposts

Last synced: 8 months ago
JSON representation

A basic Ember Js CRUD application

Awesome Lists containing this project

README

          

# Ember CRUD Blog

A simple blog project built with EmberJS that allows you to perform all the CRUD (Create, Read, Update & Delete ) operations.

![screenshot](screenshot.png)

## Table of Contents

* [Features](#features)
* [Endpoints](#endpoints)
* [API](#api)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Running](#running)
* [Built With](#built-with)
* [Contributing](#contributing)
* [Acknowledgments](#acknowledgments)
* [Authors](#author)
* [License](#license)

## Features

A user can:


  • See a full list of posts

  • Create a new Post.

  • Edit a Post

  • Delete a Post

A Post has:


  • A random generated image

  • Title

  • Description

  • Number of views

  • Date of creation

  • Random generated comments

Associations:


  • A post has many comments

  • Comments belong to a post

## Endpoints

- GET localhost:4200 - Index that displays a list of 10 posts from the beginning.
- GET localhost:4200/posts/id - Displays a single post.
- POST localhost:4200 /posts/new - For creating a new post.
- PATCH localhost:4200 /posts/id/edit - For editing an existing post.

## API

This project was built with Ember-CLI-Mirage.

Two factories were created:
- Posts
- Comments

Since these two models have a one to many association, there is only one scenario for creating Posts.
A random number of Comments is created with each Post.

The namespace of the API is set to 'api', so the Mirage requests have always '/api' as a prefix, e.g.
Mirage: [200] GET /api/posts

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

## Installation

Clone this repository by typing the following command inside your terminal:
* `git clone git@github.com:dansantander/emberposts.git` this repository

CD into the folder created by the cloning:
* `cd emberposts`

Install the required dependencies for this project:
* `npm install`

## Running

* `ember serve` or `ember s`
* Visit app at [http://localhost:4200](http://localhost:4200).
* Visit tests at [http://localhost:4200/tests](http://localhost:4200/tests).

## Built With

- Ember JS

- Ember-CLI-Mirage

- Faker JS

- Git, Github and VScode

## Contributing

Contributions, issues and feature requests are welcome!

You can do it on [issues page](issues/).

## Acknowledgments

Special thanks to Tech Island for this oportunity.

## Show your support

Give a ⭐️ if you like this project!

## Authors

👤 **Daniel Santander**

- Github: [@dansantander](https://github.com/dansantander)
- Linkedin: [Daniel Santander](https://www.linkedin.com/in/daniel-santander)
- Twitter: [@dansantandr](https://twitter.com/dansantandr)

## License

Creative Commons 2020