GithubHelp home page GithubHelp logo

carveler / communitex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piacerex/communitex

0.0 0.0 0.0 2.95 MB

License: Apache License 2.0

Elixir 40.24% SCSS 0.29% CSS 33.61% JavaScript 0.57% HTML 25.29%

communitex's Introduction

Communitex

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with npm install inside the assets directory
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Usage

mix deps.get
mix ecto.create
mix ecto.migrate
iex -S mix phx.server

Please access the following URL with your browser.

http://localhost:4000/

If you want to try lightweight CMS "Sphere" that can edit Elixir template page, API, and HTML / CSS / JS on the Web, please access the following URL.

http://localhost:4000/sphere/edit

Next, start Web + DB development like below and you'll get a much more beautiful initial design than Phoenix's defaults.

mix phx.gen.live Blog Post posts title:string body:text

or

mix phx.gen.html Blog Post posts title:string body:text

Setup Gigalixir

gigalixir pg:create --free
gigalixir run mix ecto.migrate
gigalixir ps:migrate

Troubleshooting

if mix ecto.migrate may fail on local

mix ecto.migrate --step 0

if mix ecto.migrate may fail on Gigalixir

You perform the migration with specified time stamp as shown below, it will be restored.

gigalixir run mix ecto.migrate -v XXXXXXXXXXXXXX

or

gigalixir run mix ecto.migrate -n XXXXXXXXXXXXXX

For example:

gigalixir run mix ecto.migrate -v 20210309150445

When Gigalixir is not updated with push

You perform pushing to Gigalixir with cache clean as shown below.

git -c http.extraheader="GIGALIXIR-CLEAN: true" push gigalixir

Build processes (for communitex comitter only)

mix phx.new basic --live
mv basic communitex
mix phx.gen.auth Accounts User users

mix shotrize.apply
mix phx.gen.live Members Member members user_id:integer last_name:string first_name:string last_name_kana:string first_name_kana:string detail:text image:string birthday:datetime corporate_id:integer corporate_name:string industry:string department:string position:string deleted_at:datetime

mix phx.gen.live Accounts User users email:citext hashed_password:string confirmed_at:datetime deleted_at:datetime

mix phx.gen.live Blogs Blog blogs post_id:string user_id:integer title:string image:binary tags:string body:text likes:integer views:integer deleted_at:datetime
defmodule Basic.Repo.Migrations.AlterUsersAuthTables do
  use Ecto.Migration

  def change do
    alter table(:users) do
      add :deleted_at, :naive_datetime
    end
  end
end
rm priv/repo/migrations/*_create_users.exs

communitex's People

Contributors

piacerex avatar thehaigo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.