1.0.6 • Published 12 months ago

greeting-you v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Greeting you!

A CLI tool to send greetings to your friends.

Get started

Install the package from npm

npm install -g greeting-you
# get started runnign
greet --help

# or sign up with
greet login

Local setup

  1. Create a supabase project and replace your Project URL and API Key on src/supabase.json
  2. Run the following SQL query to create your table greetings

    create table public.greetings (
      id bigint generated by default as identity primary key,
      created_at timestamp with time zone default timezone('utc'::text, now()) not null,
      "to" varchar not null,
      "from" varchar not null,
      message varchar null,
      read boolean default false
    );
    
    create policy "Enable insert for authenticated users only" ON "public"."greetings" FOR insert WITH CHECK (true);
    
    create policy "Enable select for authenticated users using email" ON "public"."greetings" FOR select USING (((auth.jwt() ->> 'email'::text) = 'to'::text));
    
    create policy "Enable delet for authenticated users using email" ON "public"."greetings" FOR delete USING (((auth.jwt() ->> 'email'::text) = 'to'::text));
    
    create policy "Enable update for authenticated users using email" ON "public"."greetings" FOR update USING (((auth.jwt() ->> 'email'::text) = 'to'::text)) WITH CHECK(((auth.jwt() ->> 'email'::text) = 'to'::text));
  3. Update you authentication email templates, the app works with OTP sent through emails, remove the {{ .ConfirmationURL }} variable and place something like:

    <p>Enter this code to complete your signup: {{ .Token }}</p>

    *Do this for all templates

Bundle

Bundle the application by running npm run build; you can then test it by executing the following:

# test without installing
node bin/index.js

# install globally and test
npm install -g .
# then run
greet
1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago